tekimax-ts 0.1.3 → 0.1.5

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/index.d.mts CHANGED
@@ -31633,16 +31633,80 @@ declare const userMessageItemParamSchema: z.ZodObject<{
31633
31633
 
31634
31634
  declare const verbosityEnumSchema: z.ZodEnum<["low", "medium", "high"]>;
31635
31635
 
31636
+ /**
31637
+ * A wrapper around the raw API response that provides helper methods
31638
+ * for common tasks like extracting text content.
31639
+ */
31640
+ declare class TekimaxResponse {
31641
+ private readonly _raw;
31642
+ constructor(_raw: ResponseResource);
31643
+ /**
31644
+ * Access the raw response object returned by the API.
31645
+ */
31646
+ get raw(): ResponseResource;
31647
+ /**
31648
+ * Automatically extracts the text content from the response.
31649
+ * It looks for the first "output_text" item in the response content.
31650
+ */
31651
+ get text(): string | undefined;
31652
+ /**
31653
+ * The ID of the response.
31654
+ */
31655
+ get id(): string | undefined;
31656
+ /**
31657
+ * The model used to generate the response.
31658
+ */
31659
+ get model(): string | undefined;
31660
+ }
31661
+ /**
31662
+ * Options for sending a message or creating a session.
31663
+ */
31664
+ type MessageOptions = Omit<CreateResponseBody, "input" | "stream">;
31665
+ /**
31666
+ * The main client for interacting with the Tekimax API.
31667
+ */
31636
31668
  declare class TekimaxClient {
31637
31669
  private baseUrl;
31638
31670
  private headers;
31671
+ /**
31672
+ * Creates a new TekimaxClient.
31673
+ *
31674
+ * @param options - Configuration options for the client.
31675
+ * @param options.baseUrl - The base URL of the API (default: "https://api.tekimax.com").
31676
+ * @param options.apiKey - Your Tekimax API key.
31677
+ *
31678
+ * @example
31679
+ * const client = new TekimaxClient({ apiKey: "tm_..." });
31680
+ */
31639
31681
  constructor(options?: {
31640
31682
  baseUrl?: string;
31641
31683
  apiKey?: string;
31642
31684
  });
31643
31685
  private request;
31644
- createSession(body: CreateResponseBody): Promise<ResponseResource>;
31645
- sendMessage(body: CreateResponseBody): Promise<ResponseResource>;
31686
+ /**
31687
+ * Creates a new session and sends the initial message.
31688
+ *
31689
+ * @param message - The initial message text to start the session.
31690
+ * @param options - Additional configuration options (model, temperature, etc.).
31691
+ *
31692
+ * @example
31693
+ * const response = await client.createSession("Hello, world!", { model: "gpt-4" });
31694
+ * console.log(response.text);
31695
+ */
31696
+ createSession(message: string, options?: MessageOptions): Promise<TekimaxResponse>;
31697
+ /**
31698
+ * Sends a message to an existing session or starts a new one if no previous_response_id is provided.
31699
+ *
31700
+ * @param message - The message text to send.
31701
+ * @param options - Additional configuration options.
31702
+ *
31703
+ * @example
31704
+ * const response = await client.sendMessage("What is the weather?", {
31705
+ * previous_response_id: "resp_123"
31706
+ * });
31707
+ * console.log(response.text);
31708
+ */
31709
+ sendMessage(message: string, options?: MessageOptions): Promise<TekimaxResponse>;
31646
31710
  }
31647
31711
 
31648
- export { type AllowedToolChoice, type AllowedToolChoiceTypeEnumKey, type AllowedToolsParam, type AllowedToolsParamTypeEnumKey, type Annotation, type AssistantMessageItemParam, type AssistantMessageItemParamRoleEnumKey, type AssistantMessageItemParamTypeEnumKey, type CreateResponseBody, type Createresponse200, type CreateresponseMutation, type CreateresponseMutationRequest, type CreateresponseMutationResponse, type DetailEnum, type DetailEnumEnumKey, type DeveloperMessageItemParam, type DeveloperMessageItemParamRoleEnumKey, type DeveloperMessageItemParamTypeEnumKey, type EmptyModelParam, type Error, type ErrorPayload, type ErrorStreamingEvent, type ErrorStreamingEventTypeEnumKey, type FunctionCall, type FunctionCallItemParam, type FunctionCallItemParamTypeEnumKey, type FunctionCallItemStatus, type FunctionCallItemStatusEnumKey, type FunctionCallOutput, type FunctionCallOutputItemParam, type FunctionCallOutputItemParamTypeEnumKey, type FunctionCallOutputStatusEnum, type FunctionCallOutputStatusEnumEnumKey, type FunctionCallOutputTypeEnumKey, type FunctionCallStatus, type FunctionCallStatusEnumKey, type FunctionCallTypeEnumKey, type FunctionTool, type FunctionToolChoice, type FunctionToolChoiceTypeEnumKey, type FunctionToolParam, type FunctionToolParamTypeEnumKey, type FunctionToolTypeEnumKey, type ImageDetail, type ImageDetailEnumKey, type IncludeEnum, type IncludeEnumEnumKey, type IncompleteDetails, type InputFileContent, type InputFileContentParam, type InputFileContentParamTypeEnumKey, type InputFileContentTypeEnumKey, type InputImageContent, type InputImageContentParamAutoParam, type InputImageContentParamAutoParamTypeEnumKey, type InputImageContentTypeEnumKey, type InputTextContent, type InputTextContentParam, type InputTextContentParamTypeEnumKey, type InputTextContentTypeEnumKey, type InputTokensDetails, type InputVideoContent, type InputVideoContentTypeEnumKey, type ItemField, type ItemParam, type ItemReferenceParam, type ItemReferenceParamTypeEnumKey, type JsonObjectResponseFormat, type JsonObjectResponseFormatTypeEnumKey, type JsonSchemaResponseFormat, type JsonSchemaResponseFormatParam, type JsonSchemaResponseFormatParamTypeEnumKey, type JsonSchemaResponseFormatTypeEnumKey, type LogProb, type Message, type MessageRole, type MessageRoleEnumKey, type MessageStatus, type MessageStatusEnumKey, type MessageTypeEnumKey, type MetadataParam, type OutputTextContent, type OutputTextContentParam, type OutputTextContentParamTypeEnumKey, type OutputTextContentTypeEnumKey, type OutputTokensDetails, type Reasoning, type ReasoningBody, type ReasoningBodyTypeEnumKey, type ReasoningEffortEnum, type ReasoningEffortEnumEnumKey, type ReasoningItemParam, type ReasoningItemParamTypeEnumKey, type ReasoningParam, type ReasoningSummaryContentParam, type ReasoningSummaryContentParamTypeEnumKey, type ReasoningSummaryEnum, type ReasoningSummaryEnumEnumKey, type ReasoningTextContent, type ReasoningTextContentTypeEnumKey, type RefusalContent, type RefusalContentParam, type RefusalContentParamTypeEnumKey, type RefusalContentTypeEnumKey, type ResponseCompletedStreamingEvent, type ResponseCompletedStreamingEventTypeEnumKey, type ResponseContentPartAddedStreamingEvent, type ResponseContentPartAddedStreamingEventTypeEnumKey, type ResponseContentPartDoneStreamingEvent, type ResponseContentPartDoneStreamingEventTypeEnumKey, type ResponseCreatedStreamingEvent, type ResponseCreatedStreamingEventTypeEnumKey, type ResponseFailedStreamingEvent, type ResponseFailedStreamingEventTypeEnumKey, type ResponseFunctionCallArgumentsDeltaStreamingEvent, type ResponseFunctionCallArgumentsDeltaStreamingEventTypeEnumKey, type ResponseFunctionCallArgumentsDoneStreamingEvent, type ResponseFunctionCallArgumentsDoneStreamingEventTypeEnumKey, type ResponseInProgressStreamingEvent, type ResponseInProgressStreamingEventTypeEnumKey, type ResponseIncompleteStreamingEvent, type ResponseIncompleteStreamingEventTypeEnumKey, type ResponseOutputItemAddedStreamingEvent, type ResponseOutputItemAddedStreamingEventTypeEnumKey, type ResponseOutputItemDoneStreamingEvent, type ResponseOutputItemDoneStreamingEventTypeEnumKey, type ResponseOutputTextAnnotationAddedStreamingEvent, type ResponseOutputTextAnnotationAddedStreamingEventTypeEnumKey, type ResponseOutputTextDeltaStreamingEvent, type ResponseOutputTextDeltaStreamingEventTypeEnumKey, type ResponseOutputTextDoneStreamingEvent, type ResponseOutputTextDoneStreamingEventTypeEnumKey, type ResponseQueuedStreamingEvent, type ResponseQueuedStreamingEventTypeEnumKey, type ResponseReasoningDeltaStreamingEvent, type ResponseReasoningDeltaStreamingEventTypeEnumKey, type ResponseReasoningDoneStreamingEvent, type ResponseReasoningDoneStreamingEventTypeEnumKey, type ResponseReasoningSummaryDeltaStreamingEvent, type ResponseReasoningSummaryDeltaStreamingEventTypeEnumKey, type ResponseReasoningSummaryDoneStreamingEvent, type ResponseReasoningSummaryDoneStreamingEventTypeEnumKey, type ResponseReasoningSummaryPartAddedStreamingEvent, type ResponseReasoningSummaryPartAddedStreamingEventTypeEnumKey, type ResponseReasoningSummaryPartDoneStreamingEvent, type ResponseReasoningSummaryPartDoneStreamingEventTypeEnumKey, type ResponseRefusalDeltaStreamingEvent, type ResponseRefusalDeltaStreamingEventTypeEnumKey, type ResponseRefusalDoneStreamingEvent, type ResponseRefusalDoneStreamingEventTypeEnumKey, type ResponseResource, type ResponseResourceObjectEnumKey, type ResponsesToolParam, type ServiceTierEnum, type ServiceTierEnumEnumKey, type SpecificFunctionParam, type SpecificFunctionParamTypeEnumKey, type SpecificToolChoiceParam, type StreamOptionsParam, type SummaryTextContent, type SummaryTextContentTypeEnumKey, type SystemMessageItemParam, type SystemMessageItemParamRoleEnumKey, type SystemMessageItemParamTypeEnumKey, TekimaxClient, type TextContent, type TextContentTypeEnumKey, type TextField, type TextFormatParam, type TextParam, type TextResponseFormat, type TextResponseFormatTypeEnumKey, type Tool, type ToolChoiceParam, type ToolChoiceValueEnum, type ToolChoiceValueEnumEnumKey, type TopLogProb, type TruncationEnum, type TruncationEnumEnumKey, type UrlCitationBody, type UrlCitationBodyTypeEnumKey, type UrlCitationParam, type UrlCitationParamTypeEnumKey, type Usage, type UserMessageItemParam, type UserMessageItemParamRoleEnumKey, type UserMessageItemParamTypeEnumKey, type VerbosityEnum, type VerbosityEnumEnumKey, allowedToolChoiceSchema, allowedToolChoiceTypeEnum, allowedToolsParamSchema, allowedToolsParamTypeEnum, annotationSchema, assistantMessageItemParamRoleEnum, assistantMessageItemParamSchema, assistantMessageItemParamTypeEnum, createResponseBodySchema, createresponse200Schema, createresponseMutationRequestSchema, createresponseMutationResponseSchema, detailEnumEnum, detailEnumSchema, developerMessageItemParamRoleEnum, developerMessageItemParamSchema, developerMessageItemParamTypeEnum, emptyModelParamSchema, errorPayloadSchema, errorSchema, errorStreamingEventSchema, errorStreamingEventTypeEnum, functionCallItemParamSchema, functionCallItemParamTypeEnum, functionCallItemStatusEnum, functionCallItemStatusSchema, functionCallOutputItemParamSchema, functionCallOutputItemParamTypeEnum, functionCallOutputSchema, functionCallOutputStatusEnumEnum, functionCallOutputStatusEnumSchema, functionCallOutputTypeEnum, functionCallSchema, functionCallStatusEnum, functionCallStatusSchema, functionCallTypeEnum, functionToolChoiceSchema, functionToolChoiceTypeEnum, functionToolParamSchema, functionToolParamTypeEnum, functionToolSchema, functionToolTypeEnum, imageDetailEnum, imageDetailSchema, includeEnumEnum, includeEnumSchema, incompleteDetailsSchema, inputFileContentParamSchema, inputFileContentParamTypeEnum, inputFileContentSchema, inputFileContentTypeEnum, inputImageContentParamAutoParamSchema, inputImageContentParamAutoParamTypeEnum, inputImageContentSchema, inputImageContentTypeEnum, inputTextContentParamSchema, inputTextContentParamTypeEnum, inputTextContentSchema, inputTextContentTypeEnum, inputTokensDetailsSchema, inputVideoContentSchema, inputVideoContentTypeEnum, itemFieldSchema, itemParamSchema, itemReferenceParamSchema, itemReferenceParamTypeEnum, jsonObjectResponseFormatSchema, jsonObjectResponseFormatTypeEnum, jsonSchemaResponseFormatParamSchema, jsonSchemaResponseFormatParamTypeEnum, jsonSchemaResponseFormatSchema, jsonSchemaResponseFormatTypeEnum, logProbSchema, messageRoleEnum, messageRoleSchema, messageSchema, messageStatusEnum, messageStatusSchema, messageTypeEnum, metadataParamSchema, outputTextContentParamSchema, outputTextContentParamTypeEnum, outputTextContentSchema, outputTextContentTypeEnum, outputTokensDetailsSchema, reasoningBodySchema, reasoningBodyTypeEnum, reasoningEffortEnumEnum, reasoningEffortEnumSchema, reasoningItemParamSchema, reasoningItemParamTypeEnum, reasoningParamSchema, reasoningSchema, reasoningSummaryContentParamSchema, reasoningSummaryContentParamTypeEnum, reasoningSummaryEnumEnum, reasoningSummaryEnumSchema, reasoningTextContentSchema, reasoningTextContentTypeEnum, refusalContentParamSchema, refusalContentParamTypeEnum, refusalContentSchema, refusalContentTypeEnum, responseCompletedStreamingEventSchema, responseCompletedStreamingEventTypeEnum, responseContentPartAddedStreamingEventSchema, responseContentPartAddedStreamingEventTypeEnum, responseContentPartDoneStreamingEventSchema, responseContentPartDoneStreamingEventTypeEnum, responseCreatedStreamingEventSchema, responseCreatedStreamingEventTypeEnum, responseFailedStreamingEventSchema, responseFailedStreamingEventTypeEnum, responseFunctionCallArgumentsDeltaStreamingEventSchema, responseFunctionCallArgumentsDeltaStreamingEventTypeEnum, responseFunctionCallArgumentsDoneStreamingEventSchema, responseFunctionCallArgumentsDoneStreamingEventTypeEnum, responseInProgressStreamingEventSchema, responseInProgressStreamingEventTypeEnum, responseIncompleteStreamingEventSchema, responseIncompleteStreamingEventTypeEnum, responseOutputItemAddedStreamingEventSchema, responseOutputItemAddedStreamingEventTypeEnum, responseOutputItemDoneStreamingEventSchema, responseOutputItemDoneStreamingEventTypeEnum, responseOutputTextAnnotationAddedStreamingEventSchema, responseOutputTextAnnotationAddedStreamingEventTypeEnum, responseOutputTextDeltaStreamingEventSchema, responseOutputTextDeltaStreamingEventTypeEnum, responseOutputTextDoneStreamingEventSchema, responseOutputTextDoneStreamingEventTypeEnum, responseQueuedStreamingEventSchema, responseQueuedStreamingEventTypeEnum, responseReasoningDeltaStreamingEventSchema, responseReasoningDeltaStreamingEventTypeEnum, responseReasoningDoneStreamingEventSchema, responseReasoningDoneStreamingEventTypeEnum, responseReasoningSummaryDeltaStreamingEventSchema, responseReasoningSummaryDeltaStreamingEventTypeEnum, responseReasoningSummaryDoneStreamingEventSchema, responseReasoningSummaryDoneStreamingEventTypeEnum, responseReasoningSummaryPartAddedStreamingEventSchema, responseReasoningSummaryPartAddedStreamingEventTypeEnum, responseReasoningSummaryPartDoneStreamingEventSchema, responseReasoningSummaryPartDoneStreamingEventTypeEnum, responseRefusalDeltaStreamingEventSchema, responseRefusalDeltaStreamingEventTypeEnum, responseRefusalDoneStreamingEventSchema, responseRefusalDoneStreamingEventTypeEnum, responseResourceObjectEnum, responseResourceSchema, responsesToolParamSchema, serviceTierEnumEnum, serviceTierEnumSchema, specificFunctionParamSchema, specificFunctionParamTypeEnum, specificToolChoiceParamSchema, streamOptionsParamSchema, summaryTextContentSchema, summaryTextContentTypeEnum, systemMessageItemParamRoleEnum, systemMessageItemParamSchema, systemMessageItemParamTypeEnum, textContentSchema, textContentTypeEnum, textFieldSchema, textFormatParamSchema, textParamSchema, textResponseFormatSchema, textResponseFormatTypeEnum, toolChoiceParamSchema, toolChoiceValueEnumEnum, toolChoiceValueEnumSchema, toolSchema, topLogProbSchema, truncationEnumEnum, truncationEnumSchema, urlCitationBodySchema, urlCitationBodyTypeEnum, urlCitationParamSchema, urlCitationParamTypeEnum, usageSchema, userMessageItemParamRoleEnum, userMessageItemParamSchema, userMessageItemParamTypeEnum, verbosityEnumEnum, verbosityEnumSchema };
31712
+ export { type AllowedToolChoice, type AllowedToolChoiceTypeEnumKey, type AllowedToolsParam, type AllowedToolsParamTypeEnumKey, type Annotation, type AssistantMessageItemParam, type AssistantMessageItemParamRoleEnumKey, type AssistantMessageItemParamTypeEnumKey, type CreateResponseBody, type Createresponse200, type CreateresponseMutation, type CreateresponseMutationRequest, type CreateresponseMutationResponse, type DetailEnum, type DetailEnumEnumKey, type DeveloperMessageItemParam, type DeveloperMessageItemParamRoleEnumKey, type DeveloperMessageItemParamTypeEnumKey, type EmptyModelParam, type Error, type ErrorPayload, type ErrorStreamingEvent, type ErrorStreamingEventTypeEnumKey, type FunctionCall, type FunctionCallItemParam, type FunctionCallItemParamTypeEnumKey, type FunctionCallItemStatus, type FunctionCallItemStatusEnumKey, type FunctionCallOutput, type FunctionCallOutputItemParam, type FunctionCallOutputItemParamTypeEnumKey, type FunctionCallOutputStatusEnum, type FunctionCallOutputStatusEnumEnumKey, type FunctionCallOutputTypeEnumKey, type FunctionCallStatus, type FunctionCallStatusEnumKey, type FunctionCallTypeEnumKey, type FunctionTool, type FunctionToolChoice, type FunctionToolChoiceTypeEnumKey, type FunctionToolParam, type FunctionToolParamTypeEnumKey, type FunctionToolTypeEnumKey, type ImageDetail, type ImageDetailEnumKey, type IncludeEnum, type IncludeEnumEnumKey, type IncompleteDetails, type InputFileContent, type InputFileContentParam, type InputFileContentParamTypeEnumKey, type InputFileContentTypeEnumKey, type InputImageContent, type InputImageContentParamAutoParam, type InputImageContentParamAutoParamTypeEnumKey, type InputImageContentTypeEnumKey, type InputTextContent, type InputTextContentParam, type InputTextContentParamTypeEnumKey, type InputTextContentTypeEnumKey, type InputTokensDetails, type InputVideoContent, type InputVideoContentTypeEnumKey, type ItemField, type ItemParam, type ItemReferenceParam, type ItemReferenceParamTypeEnumKey, type JsonObjectResponseFormat, type JsonObjectResponseFormatTypeEnumKey, type JsonSchemaResponseFormat, type JsonSchemaResponseFormatParam, type JsonSchemaResponseFormatParamTypeEnumKey, type JsonSchemaResponseFormatTypeEnumKey, type LogProb, type Message, type MessageRole, type MessageRoleEnumKey, type MessageStatus, type MessageStatusEnumKey, type MessageTypeEnumKey, type MetadataParam, type OutputTextContent, type OutputTextContentParam, type OutputTextContentParamTypeEnumKey, type OutputTextContentTypeEnumKey, type OutputTokensDetails, type Reasoning, type ReasoningBody, type ReasoningBodyTypeEnumKey, type ReasoningEffortEnum, type ReasoningEffortEnumEnumKey, type ReasoningItemParam, type ReasoningItemParamTypeEnumKey, type ReasoningParam, type ReasoningSummaryContentParam, type ReasoningSummaryContentParamTypeEnumKey, type ReasoningSummaryEnum, type ReasoningSummaryEnumEnumKey, type ReasoningTextContent, type ReasoningTextContentTypeEnumKey, type RefusalContent, type RefusalContentParam, type RefusalContentParamTypeEnumKey, type RefusalContentTypeEnumKey, type ResponseCompletedStreamingEvent, type ResponseCompletedStreamingEventTypeEnumKey, type ResponseContentPartAddedStreamingEvent, type ResponseContentPartAddedStreamingEventTypeEnumKey, type ResponseContentPartDoneStreamingEvent, type ResponseContentPartDoneStreamingEventTypeEnumKey, type ResponseCreatedStreamingEvent, type ResponseCreatedStreamingEventTypeEnumKey, type ResponseFailedStreamingEvent, type ResponseFailedStreamingEventTypeEnumKey, type ResponseFunctionCallArgumentsDeltaStreamingEvent, type ResponseFunctionCallArgumentsDeltaStreamingEventTypeEnumKey, type ResponseFunctionCallArgumentsDoneStreamingEvent, type ResponseFunctionCallArgumentsDoneStreamingEventTypeEnumKey, type ResponseInProgressStreamingEvent, type ResponseInProgressStreamingEventTypeEnumKey, type ResponseIncompleteStreamingEvent, type ResponseIncompleteStreamingEventTypeEnumKey, type ResponseOutputItemAddedStreamingEvent, type ResponseOutputItemAddedStreamingEventTypeEnumKey, type ResponseOutputItemDoneStreamingEvent, type ResponseOutputItemDoneStreamingEventTypeEnumKey, type ResponseOutputTextAnnotationAddedStreamingEvent, type ResponseOutputTextAnnotationAddedStreamingEventTypeEnumKey, type ResponseOutputTextDeltaStreamingEvent, type ResponseOutputTextDeltaStreamingEventTypeEnumKey, type ResponseOutputTextDoneStreamingEvent, type ResponseOutputTextDoneStreamingEventTypeEnumKey, type ResponseQueuedStreamingEvent, type ResponseQueuedStreamingEventTypeEnumKey, type ResponseReasoningDeltaStreamingEvent, type ResponseReasoningDeltaStreamingEventTypeEnumKey, type ResponseReasoningDoneStreamingEvent, type ResponseReasoningDoneStreamingEventTypeEnumKey, type ResponseReasoningSummaryDeltaStreamingEvent, type ResponseReasoningSummaryDeltaStreamingEventTypeEnumKey, type ResponseReasoningSummaryDoneStreamingEvent, type ResponseReasoningSummaryDoneStreamingEventTypeEnumKey, type ResponseReasoningSummaryPartAddedStreamingEvent, type ResponseReasoningSummaryPartAddedStreamingEventTypeEnumKey, type ResponseReasoningSummaryPartDoneStreamingEvent, type ResponseReasoningSummaryPartDoneStreamingEventTypeEnumKey, type ResponseRefusalDeltaStreamingEvent, type ResponseRefusalDeltaStreamingEventTypeEnumKey, type ResponseRefusalDoneStreamingEvent, type ResponseRefusalDoneStreamingEventTypeEnumKey, type ResponseResource, type ResponseResourceObjectEnumKey, type ResponsesToolParam, type ServiceTierEnum, type ServiceTierEnumEnumKey, type SpecificFunctionParam, type SpecificFunctionParamTypeEnumKey, type SpecificToolChoiceParam, type StreamOptionsParam, type SummaryTextContent, type SummaryTextContentTypeEnumKey, type SystemMessageItemParam, type SystemMessageItemParamRoleEnumKey, type SystemMessageItemParamTypeEnumKey, TekimaxClient, TekimaxResponse, type TextContent, type TextContentTypeEnumKey, type TextField, type TextFormatParam, type TextParam, type TextResponseFormat, type TextResponseFormatTypeEnumKey, type Tool, type ToolChoiceParam, type ToolChoiceValueEnum, type ToolChoiceValueEnumEnumKey, type TopLogProb, type TruncationEnum, type TruncationEnumEnumKey, type UrlCitationBody, type UrlCitationBodyTypeEnumKey, type UrlCitationParam, type UrlCitationParamTypeEnumKey, type Usage, type UserMessageItemParam, type UserMessageItemParamRoleEnumKey, type UserMessageItemParamTypeEnumKey, type VerbosityEnum, type VerbosityEnumEnumKey, allowedToolChoiceSchema, allowedToolChoiceTypeEnum, allowedToolsParamSchema, allowedToolsParamTypeEnum, annotationSchema, assistantMessageItemParamRoleEnum, assistantMessageItemParamSchema, assistantMessageItemParamTypeEnum, createResponseBodySchema, createresponse200Schema, createresponseMutationRequestSchema, createresponseMutationResponseSchema, detailEnumEnum, detailEnumSchema, developerMessageItemParamRoleEnum, developerMessageItemParamSchema, developerMessageItemParamTypeEnum, emptyModelParamSchema, errorPayloadSchema, errorSchema, errorStreamingEventSchema, errorStreamingEventTypeEnum, functionCallItemParamSchema, functionCallItemParamTypeEnum, functionCallItemStatusEnum, functionCallItemStatusSchema, functionCallOutputItemParamSchema, functionCallOutputItemParamTypeEnum, functionCallOutputSchema, functionCallOutputStatusEnumEnum, functionCallOutputStatusEnumSchema, functionCallOutputTypeEnum, functionCallSchema, functionCallStatusEnum, functionCallStatusSchema, functionCallTypeEnum, functionToolChoiceSchema, functionToolChoiceTypeEnum, functionToolParamSchema, functionToolParamTypeEnum, functionToolSchema, functionToolTypeEnum, imageDetailEnum, imageDetailSchema, includeEnumEnum, includeEnumSchema, incompleteDetailsSchema, inputFileContentParamSchema, inputFileContentParamTypeEnum, inputFileContentSchema, inputFileContentTypeEnum, inputImageContentParamAutoParamSchema, inputImageContentParamAutoParamTypeEnum, inputImageContentSchema, inputImageContentTypeEnum, inputTextContentParamSchema, inputTextContentParamTypeEnum, inputTextContentSchema, inputTextContentTypeEnum, inputTokensDetailsSchema, inputVideoContentSchema, inputVideoContentTypeEnum, itemFieldSchema, itemParamSchema, itemReferenceParamSchema, itemReferenceParamTypeEnum, jsonObjectResponseFormatSchema, jsonObjectResponseFormatTypeEnum, jsonSchemaResponseFormatParamSchema, jsonSchemaResponseFormatParamTypeEnum, jsonSchemaResponseFormatSchema, jsonSchemaResponseFormatTypeEnum, logProbSchema, messageRoleEnum, messageRoleSchema, messageSchema, messageStatusEnum, messageStatusSchema, messageTypeEnum, metadataParamSchema, outputTextContentParamSchema, outputTextContentParamTypeEnum, outputTextContentSchema, outputTextContentTypeEnum, outputTokensDetailsSchema, reasoningBodySchema, reasoningBodyTypeEnum, reasoningEffortEnumEnum, reasoningEffortEnumSchema, reasoningItemParamSchema, reasoningItemParamTypeEnum, reasoningParamSchema, reasoningSchema, reasoningSummaryContentParamSchema, reasoningSummaryContentParamTypeEnum, reasoningSummaryEnumEnum, reasoningSummaryEnumSchema, reasoningTextContentSchema, reasoningTextContentTypeEnum, refusalContentParamSchema, refusalContentParamTypeEnum, refusalContentSchema, refusalContentTypeEnum, responseCompletedStreamingEventSchema, responseCompletedStreamingEventTypeEnum, responseContentPartAddedStreamingEventSchema, responseContentPartAddedStreamingEventTypeEnum, responseContentPartDoneStreamingEventSchema, responseContentPartDoneStreamingEventTypeEnum, responseCreatedStreamingEventSchema, responseCreatedStreamingEventTypeEnum, responseFailedStreamingEventSchema, responseFailedStreamingEventTypeEnum, responseFunctionCallArgumentsDeltaStreamingEventSchema, responseFunctionCallArgumentsDeltaStreamingEventTypeEnum, responseFunctionCallArgumentsDoneStreamingEventSchema, responseFunctionCallArgumentsDoneStreamingEventTypeEnum, responseInProgressStreamingEventSchema, responseInProgressStreamingEventTypeEnum, responseIncompleteStreamingEventSchema, responseIncompleteStreamingEventTypeEnum, responseOutputItemAddedStreamingEventSchema, responseOutputItemAddedStreamingEventTypeEnum, responseOutputItemDoneStreamingEventSchema, responseOutputItemDoneStreamingEventTypeEnum, responseOutputTextAnnotationAddedStreamingEventSchema, responseOutputTextAnnotationAddedStreamingEventTypeEnum, responseOutputTextDeltaStreamingEventSchema, responseOutputTextDeltaStreamingEventTypeEnum, responseOutputTextDoneStreamingEventSchema, responseOutputTextDoneStreamingEventTypeEnum, responseQueuedStreamingEventSchema, responseQueuedStreamingEventTypeEnum, responseReasoningDeltaStreamingEventSchema, responseReasoningDeltaStreamingEventTypeEnum, responseReasoningDoneStreamingEventSchema, responseReasoningDoneStreamingEventTypeEnum, responseReasoningSummaryDeltaStreamingEventSchema, responseReasoningSummaryDeltaStreamingEventTypeEnum, responseReasoningSummaryDoneStreamingEventSchema, responseReasoningSummaryDoneStreamingEventTypeEnum, responseReasoningSummaryPartAddedStreamingEventSchema, responseReasoningSummaryPartAddedStreamingEventTypeEnum, responseReasoningSummaryPartDoneStreamingEventSchema, responseReasoningSummaryPartDoneStreamingEventTypeEnum, responseRefusalDeltaStreamingEventSchema, responseRefusalDeltaStreamingEventTypeEnum, responseRefusalDoneStreamingEventSchema, responseRefusalDoneStreamingEventTypeEnum, responseResourceObjectEnum, responseResourceSchema, responsesToolParamSchema, serviceTierEnumEnum, serviceTierEnumSchema, specificFunctionParamSchema, specificFunctionParamTypeEnum, specificToolChoiceParamSchema, streamOptionsParamSchema, summaryTextContentSchema, summaryTextContentTypeEnum, systemMessageItemParamRoleEnum, systemMessageItemParamSchema, systemMessageItemParamTypeEnum, textContentSchema, textContentTypeEnum, textFieldSchema, textFormatParamSchema, textParamSchema, textResponseFormatSchema, textResponseFormatTypeEnum, toolChoiceParamSchema, toolChoiceValueEnumEnum, toolChoiceValueEnumSchema, toolSchema, topLogProbSchema, truncationEnumEnum, truncationEnumSchema, urlCitationBodySchema, urlCitationBodyTypeEnum, urlCitationParamSchema, urlCitationParamTypeEnum, usageSchema, userMessageItemParamRoleEnum, userMessageItemParamSchema, userMessageItemParamTypeEnum, verbosityEnumEnum, verbosityEnumSchema };
package/dist/index.d.ts CHANGED
@@ -31633,16 +31633,80 @@ declare const userMessageItemParamSchema: z.ZodObject<{
31633
31633
 
31634
31634
  declare const verbosityEnumSchema: z.ZodEnum<["low", "medium", "high"]>;
31635
31635
 
31636
+ /**
31637
+ * A wrapper around the raw API response that provides helper methods
31638
+ * for common tasks like extracting text content.
31639
+ */
31640
+ declare class TekimaxResponse {
31641
+ private readonly _raw;
31642
+ constructor(_raw: ResponseResource);
31643
+ /**
31644
+ * Access the raw response object returned by the API.
31645
+ */
31646
+ get raw(): ResponseResource;
31647
+ /**
31648
+ * Automatically extracts the text content from the response.
31649
+ * It looks for the first "output_text" item in the response content.
31650
+ */
31651
+ get text(): string | undefined;
31652
+ /**
31653
+ * The ID of the response.
31654
+ */
31655
+ get id(): string | undefined;
31656
+ /**
31657
+ * The model used to generate the response.
31658
+ */
31659
+ get model(): string | undefined;
31660
+ }
31661
+ /**
31662
+ * Options for sending a message or creating a session.
31663
+ */
31664
+ type MessageOptions = Omit<CreateResponseBody, "input" | "stream">;
31665
+ /**
31666
+ * The main client for interacting with the Tekimax API.
31667
+ */
31636
31668
  declare class TekimaxClient {
31637
31669
  private baseUrl;
31638
31670
  private headers;
31671
+ /**
31672
+ * Creates a new TekimaxClient.
31673
+ *
31674
+ * @param options - Configuration options for the client.
31675
+ * @param options.baseUrl - The base URL of the API (default: "https://api.tekimax.com").
31676
+ * @param options.apiKey - Your Tekimax API key.
31677
+ *
31678
+ * @example
31679
+ * const client = new TekimaxClient({ apiKey: "tm_..." });
31680
+ */
31639
31681
  constructor(options?: {
31640
31682
  baseUrl?: string;
31641
31683
  apiKey?: string;
31642
31684
  });
31643
31685
  private request;
31644
- createSession(body: CreateResponseBody): Promise<ResponseResource>;
31645
- sendMessage(body: CreateResponseBody): Promise<ResponseResource>;
31686
+ /**
31687
+ * Creates a new session and sends the initial message.
31688
+ *
31689
+ * @param message - The initial message text to start the session.
31690
+ * @param options - Additional configuration options (model, temperature, etc.).
31691
+ *
31692
+ * @example
31693
+ * const response = await client.createSession("Hello, world!", { model: "gpt-4" });
31694
+ * console.log(response.text);
31695
+ */
31696
+ createSession(message: string, options?: MessageOptions): Promise<TekimaxResponse>;
31697
+ /**
31698
+ * Sends a message to an existing session or starts a new one if no previous_response_id is provided.
31699
+ *
31700
+ * @param message - The message text to send.
31701
+ * @param options - Additional configuration options.
31702
+ *
31703
+ * @example
31704
+ * const response = await client.sendMessage("What is the weather?", {
31705
+ * previous_response_id: "resp_123"
31706
+ * });
31707
+ * console.log(response.text);
31708
+ */
31709
+ sendMessage(message: string, options?: MessageOptions): Promise<TekimaxResponse>;
31646
31710
  }
31647
31711
 
31648
- export { type AllowedToolChoice, type AllowedToolChoiceTypeEnumKey, type AllowedToolsParam, type AllowedToolsParamTypeEnumKey, type Annotation, type AssistantMessageItemParam, type AssistantMessageItemParamRoleEnumKey, type AssistantMessageItemParamTypeEnumKey, type CreateResponseBody, type Createresponse200, type CreateresponseMutation, type CreateresponseMutationRequest, type CreateresponseMutationResponse, type DetailEnum, type DetailEnumEnumKey, type DeveloperMessageItemParam, type DeveloperMessageItemParamRoleEnumKey, type DeveloperMessageItemParamTypeEnumKey, type EmptyModelParam, type Error, type ErrorPayload, type ErrorStreamingEvent, type ErrorStreamingEventTypeEnumKey, type FunctionCall, type FunctionCallItemParam, type FunctionCallItemParamTypeEnumKey, type FunctionCallItemStatus, type FunctionCallItemStatusEnumKey, type FunctionCallOutput, type FunctionCallOutputItemParam, type FunctionCallOutputItemParamTypeEnumKey, type FunctionCallOutputStatusEnum, type FunctionCallOutputStatusEnumEnumKey, type FunctionCallOutputTypeEnumKey, type FunctionCallStatus, type FunctionCallStatusEnumKey, type FunctionCallTypeEnumKey, type FunctionTool, type FunctionToolChoice, type FunctionToolChoiceTypeEnumKey, type FunctionToolParam, type FunctionToolParamTypeEnumKey, type FunctionToolTypeEnumKey, type ImageDetail, type ImageDetailEnumKey, type IncludeEnum, type IncludeEnumEnumKey, type IncompleteDetails, type InputFileContent, type InputFileContentParam, type InputFileContentParamTypeEnumKey, type InputFileContentTypeEnumKey, type InputImageContent, type InputImageContentParamAutoParam, type InputImageContentParamAutoParamTypeEnumKey, type InputImageContentTypeEnumKey, type InputTextContent, type InputTextContentParam, type InputTextContentParamTypeEnumKey, type InputTextContentTypeEnumKey, type InputTokensDetails, type InputVideoContent, type InputVideoContentTypeEnumKey, type ItemField, type ItemParam, type ItemReferenceParam, type ItemReferenceParamTypeEnumKey, type JsonObjectResponseFormat, type JsonObjectResponseFormatTypeEnumKey, type JsonSchemaResponseFormat, type JsonSchemaResponseFormatParam, type JsonSchemaResponseFormatParamTypeEnumKey, type JsonSchemaResponseFormatTypeEnumKey, type LogProb, type Message, type MessageRole, type MessageRoleEnumKey, type MessageStatus, type MessageStatusEnumKey, type MessageTypeEnumKey, type MetadataParam, type OutputTextContent, type OutputTextContentParam, type OutputTextContentParamTypeEnumKey, type OutputTextContentTypeEnumKey, type OutputTokensDetails, type Reasoning, type ReasoningBody, type ReasoningBodyTypeEnumKey, type ReasoningEffortEnum, type ReasoningEffortEnumEnumKey, type ReasoningItemParam, type ReasoningItemParamTypeEnumKey, type ReasoningParam, type ReasoningSummaryContentParam, type ReasoningSummaryContentParamTypeEnumKey, type ReasoningSummaryEnum, type ReasoningSummaryEnumEnumKey, type ReasoningTextContent, type ReasoningTextContentTypeEnumKey, type RefusalContent, type RefusalContentParam, type RefusalContentParamTypeEnumKey, type RefusalContentTypeEnumKey, type ResponseCompletedStreamingEvent, type ResponseCompletedStreamingEventTypeEnumKey, type ResponseContentPartAddedStreamingEvent, type ResponseContentPartAddedStreamingEventTypeEnumKey, type ResponseContentPartDoneStreamingEvent, type ResponseContentPartDoneStreamingEventTypeEnumKey, type ResponseCreatedStreamingEvent, type ResponseCreatedStreamingEventTypeEnumKey, type ResponseFailedStreamingEvent, type ResponseFailedStreamingEventTypeEnumKey, type ResponseFunctionCallArgumentsDeltaStreamingEvent, type ResponseFunctionCallArgumentsDeltaStreamingEventTypeEnumKey, type ResponseFunctionCallArgumentsDoneStreamingEvent, type ResponseFunctionCallArgumentsDoneStreamingEventTypeEnumKey, type ResponseInProgressStreamingEvent, type ResponseInProgressStreamingEventTypeEnumKey, type ResponseIncompleteStreamingEvent, type ResponseIncompleteStreamingEventTypeEnumKey, type ResponseOutputItemAddedStreamingEvent, type ResponseOutputItemAddedStreamingEventTypeEnumKey, type ResponseOutputItemDoneStreamingEvent, type ResponseOutputItemDoneStreamingEventTypeEnumKey, type ResponseOutputTextAnnotationAddedStreamingEvent, type ResponseOutputTextAnnotationAddedStreamingEventTypeEnumKey, type ResponseOutputTextDeltaStreamingEvent, type ResponseOutputTextDeltaStreamingEventTypeEnumKey, type ResponseOutputTextDoneStreamingEvent, type ResponseOutputTextDoneStreamingEventTypeEnumKey, type ResponseQueuedStreamingEvent, type ResponseQueuedStreamingEventTypeEnumKey, type ResponseReasoningDeltaStreamingEvent, type ResponseReasoningDeltaStreamingEventTypeEnumKey, type ResponseReasoningDoneStreamingEvent, type ResponseReasoningDoneStreamingEventTypeEnumKey, type ResponseReasoningSummaryDeltaStreamingEvent, type ResponseReasoningSummaryDeltaStreamingEventTypeEnumKey, type ResponseReasoningSummaryDoneStreamingEvent, type ResponseReasoningSummaryDoneStreamingEventTypeEnumKey, type ResponseReasoningSummaryPartAddedStreamingEvent, type ResponseReasoningSummaryPartAddedStreamingEventTypeEnumKey, type ResponseReasoningSummaryPartDoneStreamingEvent, type ResponseReasoningSummaryPartDoneStreamingEventTypeEnumKey, type ResponseRefusalDeltaStreamingEvent, type ResponseRefusalDeltaStreamingEventTypeEnumKey, type ResponseRefusalDoneStreamingEvent, type ResponseRefusalDoneStreamingEventTypeEnumKey, type ResponseResource, type ResponseResourceObjectEnumKey, type ResponsesToolParam, type ServiceTierEnum, type ServiceTierEnumEnumKey, type SpecificFunctionParam, type SpecificFunctionParamTypeEnumKey, type SpecificToolChoiceParam, type StreamOptionsParam, type SummaryTextContent, type SummaryTextContentTypeEnumKey, type SystemMessageItemParam, type SystemMessageItemParamRoleEnumKey, type SystemMessageItemParamTypeEnumKey, TekimaxClient, type TextContent, type TextContentTypeEnumKey, type TextField, type TextFormatParam, type TextParam, type TextResponseFormat, type TextResponseFormatTypeEnumKey, type Tool, type ToolChoiceParam, type ToolChoiceValueEnum, type ToolChoiceValueEnumEnumKey, type TopLogProb, type TruncationEnum, type TruncationEnumEnumKey, type UrlCitationBody, type UrlCitationBodyTypeEnumKey, type UrlCitationParam, type UrlCitationParamTypeEnumKey, type Usage, type UserMessageItemParam, type UserMessageItemParamRoleEnumKey, type UserMessageItemParamTypeEnumKey, type VerbosityEnum, type VerbosityEnumEnumKey, allowedToolChoiceSchema, allowedToolChoiceTypeEnum, allowedToolsParamSchema, allowedToolsParamTypeEnum, annotationSchema, assistantMessageItemParamRoleEnum, assistantMessageItemParamSchema, assistantMessageItemParamTypeEnum, createResponseBodySchema, createresponse200Schema, createresponseMutationRequestSchema, createresponseMutationResponseSchema, detailEnumEnum, detailEnumSchema, developerMessageItemParamRoleEnum, developerMessageItemParamSchema, developerMessageItemParamTypeEnum, emptyModelParamSchema, errorPayloadSchema, errorSchema, errorStreamingEventSchema, errorStreamingEventTypeEnum, functionCallItemParamSchema, functionCallItemParamTypeEnum, functionCallItemStatusEnum, functionCallItemStatusSchema, functionCallOutputItemParamSchema, functionCallOutputItemParamTypeEnum, functionCallOutputSchema, functionCallOutputStatusEnumEnum, functionCallOutputStatusEnumSchema, functionCallOutputTypeEnum, functionCallSchema, functionCallStatusEnum, functionCallStatusSchema, functionCallTypeEnum, functionToolChoiceSchema, functionToolChoiceTypeEnum, functionToolParamSchema, functionToolParamTypeEnum, functionToolSchema, functionToolTypeEnum, imageDetailEnum, imageDetailSchema, includeEnumEnum, includeEnumSchema, incompleteDetailsSchema, inputFileContentParamSchema, inputFileContentParamTypeEnum, inputFileContentSchema, inputFileContentTypeEnum, inputImageContentParamAutoParamSchema, inputImageContentParamAutoParamTypeEnum, inputImageContentSchema, inputImageContentTypeEnum, inputTextContentParamSchema, inputTextContentParamTypeEnum, inputTextContentSchema, inputTextContentTypeEnum, inputTokensDetailsSchema, inputVideoContentSchema, inputVideoContentTypeEnum, itemFieldSchema, itemParamSchema, itemReferenceParamSchema, itemReferenceParamTypeEnum, jsonObjectResponseFormatSchema, jsonObjectResponseFormatTypeEnum, jsonSchemaResponseFormatParamSchema, jsonSchemaResponseFormatParamTypeEnum, jsonSchemaResponseFormatSchema, jsonSchemaResponseFormatTypeEnum, logProbSchema, messageRoleEnum, messageRoleSchema, messageSchema, messageStatusEnum, messageStatusSchema, messageTypeEnum, metadataParamSchema, outputTextContentParamSchema, outputTextContentParamTypeEnum, outputTextContentSchema, outputTextContentTypeEnum, outputTokensDetailsSchema, reasoningBodySchema, reasoningBodyTypeEnum, reasoningEffortEnumEnum, reasoningEffortEnumSchema, reasoningItemParamSchema, reasoningItemParamTypeEnum, reasoningParamSchema, reasoningSchema, reasoningSummaryContentParamSchema, reasoningSummaryContentParamTypeEnum, reasoningSummaryEnumEnum, reasoningSummaryEnumSchema, reasoningTextContentSchema, reasoningTextContentTypeEnum, refusalContentParamSchema, refusalContentParamTypeEnum, refusalContentSchema, refusalContentTypeEnum, responseCompletedStreamingEventSchema, responseCompletedStreamingEventTypeEnum, responseContentPartAddedStreamingEventSchema, responseContentPartAddedStreamingEventTypeEnum, responseContentPartDoneStreamingEventSchema, responseContentPartDoneStreamingEventTypeEnum, responseCreatedStreamingEventSchema, responseCreatedStreamingEventTypeEnum, responseFailedStreamingEventSchema, responseFailedStreamingEventTypeEnum, responseFunctionCallArgumentsDeltaStreamingEventSchema, responseFunctionCallArgumentsDeltaStreamingEventTypeEnum, responseFunctionCallArgumentsDoneStreamingEventSchema, responseFunctionCallArgumentsDoneStreamingEventTypeEnum, responseInProgressStreamingEventSchema, responseInProgressStreamingEventTypeEnum, responseIncompleteStreamingEventSchema, responseIncompleteStreamingEventTypeEnum, responseOutputItemAddedStreamingEventSchema, responseOutputItemAddedStreamingEventTypeEnum, responseOutputItemDoneStreamingEventSchema, responseOutputItemDoneStreamingEventTypeEnum, responseOutputTextAnnotationAddedStreamingEventSchema, responseOutputTextAnnotationAddedStreamingEventTypeEnum, responseOutputTextDeltaStreamingEventSchema, responseOutputTextDeltaStreamingEventTypeEnum, responseOutputTextDoneStreamingEventSchema, responseOutputTextDoneStreamingEventTypeEnum, responseQueuedStreamingEventSchema, responseQueuedStreamingEventTypeEnum, responseReasoningDeltaStreamingEventSchema, responseReasoningDeltaStreamingEventTypeEnum, responseReasoningDoneStreamingEventSchema, responseReasoningDoneStreamingEventTypeEnum, responseReasoningSummaryDeltaStreamingEventSchema, responseReasoningSummaryDeltaStreamingEventTypeEnum, responseReasoningSummaryDoneStreamingEventSchema, responseReasoningSummaryDoneStreamingEventTypeEnum, responseReasoningSummaryPartAddedStreamingEventSchema, responseReasoningSummaryPartAddedStreamingEventTypeEnum, responseReasoningSummaryPartDoneStreamingEventSchema, responseReasoningSummaryPartDoneStreamingEventTypeEnum, responseRefusalDeltaStreamingEventSchema, responseRefusalDeltaStreamingEventTypeEnum, responseRefusalDoneStreamingEventSchema, responseRefusalDoneStreamingEventTypeEnum, responseResourceObjectEnum, responseResourceSchema, responsesToolParamSchema, serviceTierEnumEnum, serviceTierEnumSchema, specificFunctionParamSchema, specificFunctionParamTypeEnum, specificToolChoiceParamSchema, streamOptionsParamSchema, summaryTextContentSchema, summaryTextContentTypeEnum, systemMessageItemParamRoleEnum, systemMessageItemParamSchema, systemMessageItemParamTypeEnum, textContentSchema, textContentTypeEnum, textFieldSchema, textFormatParamSchema, textParamSchema, textResponseFormatSchema, textResponseFormatTypeEnum, toolChoiceParamSchema, toolChoiceValueEnumEnum, toolChoiceValueEnumSchema, toolSchema, topLogProbSchema, truncationEnumEnum, truncationEnumSchema, urlCitationBodySchema, urlCitationBodyTypeEnum, urlCitationParamSchema, urlCitationParamTypeEnum, usageSchema, userMessageItemParamRoleEnum, userMessageItemParamSchema, userMessageItemParamTypeEnum, verbosityEnumEnum, verbosityEnumSchema };
31712
+ export { type AllowedToolChoice, type AllowedToolChoiceTypeEnumKey, type AllowedToolsParam, type AllowedToolsParamTypeEnumKey, type Annotation, type AssistantMessageItemParam, type AssistantMessageItemParamRoleEnumKey, type AssistantMessageItemParamTypeEnumKey, type CreateResponseBody, type Createresponse200, type CreateresponseMutation, type CreateresponseMutationRequest, type CreateresponseMutationResponse, type DetailEnum, type DetailEnumEnumKey, type DeveloperMessageItemParam, type DeveloperMessageItemParamRoleEnumKey, type DeveloperMessageItemParamTypeEnumKey, type EmptyModelParam, type Error, type ErrorPayload, type ErrorStreamingEvent, type ErrorStreamingEventTypeEnumKey, type FunctionCall, type FunctionCallItemParam, type FunctionCallItemParamTypeEnumKey, type FunctionCallItemStatus, type FunctionCallItemStatusEnumKey, type FunctionCallOutput, type FunctionCallOutputItemParam, type FunctionCallOutputItemParamTypeEnumKey, type FunctionCallOutputStatusEnum, type FunctionCallOutputStatusEnumEnumKey, type FunctionCallOutputTypeEnumKey, type FunctionCallStatus, type FunctionCallStatusEnumKey, type FunctionCallTypeEnumKey, type FunctionTool, type FunctionToolChoice, type FunctionToolChoiceTypeEnumKey, type FunctionToolParam, type FunctionToolParamTypeEnumKey, type FunctionToolTypeEnumKey, type ImageDetail, type ImageDetailEnumKey, type IncludeEnum, type IncludeEnumEnumKey, type IncompleteDetails, type InputFileContent, type InputFileContentParam, type InputFileContentParamTypeEnumKey, type InputFileContentTypeEnumKey, type InputImageContent, type InputImageContentParamAutoParam, type InputImageContentParamAutoParamTypeEnumKey, type InputImageContentTypeEnumKey, type InputTextContent, type InputTextContentParam, type InputTextContentParamTypeEnumKey, type InputTextContentTypeEnumKey, type InputTokensDetails, type InputVideoContent, type InputVideoContentTypeEnumKey, type ItemField, type ItemParam, type ItemReferenceParam, type ItemReferenceParamTypeEnumKey, type JsonObjectResponseFormat, type JsonObjectResponseFormatTypeEnumKey, type JsonSchemaResponseFormat, type JsonSchemaResponseFormatParam, type JsonSchemaResponseFormatParamTypeEnumKey, type JsonSchemaResponseFormatTypeEnumKey, type LogProb, type Message, type MessageRole, type MessageRoleEnumKey, type MessageStatus, type MessageStatusEnumKey, type MessageTypeEnumKey, type MetadataParam, type OutputTextContent, type OutputTextContentParam, type OutputTextContentParamTypeEnumKey, type OutputTextContentTypeEnumKey, type OutputTokensDetails, type Reasoning, type ReasoningBody, type ReasoningBodyTypeEnumKey, type ReasoningEffortEnum, type ReasoningEffortEnumEnumKey, type ReasoningItemParam, type ReasoningItemParamTypeEnumKey, type ReasoningParam, type ReasoningSummaryContentParam, type ReasoningSummaryContentParamTypeEnumKey, type ReasoningSummaryEnum, type ReasoningSummaryEnumEnumKey, type ReasoningTextContent, type ReasoningTextContentTypeEnumKey, type RefusalContent, type RefusalContentParam, type RefusalContentParamTypeEnumKey, type RefusalContentTypeEnumKey, type ResponseCompletedStreamingEvent, type ResponseCompletedStreamingEventTypeEnumKey, type ResponseContentPartAddedStreamingEvent, type ResponseContentPartAddedStreamingEventTypeEnumKey, type ResponseContentPartDoneStreamingEvent, type ResponseContentPartDoneStreamingEventTypeEnumKey, type ResponseCreatedStreamingEvent, type ResponseCreatedStreamingEventTypeEnumKey, type ResponseFailedStreamingEvent, type ResponseFailedStreamingEventTypeEnumKey, type ResponseFunctionCallArgumentsDeltaStreamingEvent, type ResponseFunctionCallArgumentsDeltaStreamingEventTypeEnumKey, type ResponseFunctionCallArgumentsDoneStreamingEvent, type ResponseFunctionCallArgumentsDoneStreamingEventTypeEnumKey, type ResponseInProgressStreamingEvent, type ResponseInProgressStreamingEventTypeEnumKey, type ResponseIncompleteStreamingEvent, type ResponseIncompleteStreamingEventTypeEnumKey, type ResponseOutputItemAddedStreamingEvent, type ResponseOutputItemAddedStreamingEventTypeEnumKey, type ResponseOutputItemDoneStreamingEvent, type ResponseOutputItemDoneStreamingEventTypeEnumKey, type ResponseOutputTextAnnotationAddedStreamingEvent, type ResponseOutputTextAnnotationAddedStreamingEventTypeEnumKey, type ResponseOutputTextDeltaStreamingEvent, type ResponseOutputTextDeltaStreamingEventTypeEnumKey, type ResponseOutputTextDoneStreamingEvent, type ResponseOutputTextDoneStreamingEventTypeEnumKey, type ResponseQueuedStreamingEvent, type ResponseQueuedStreamingEventTypeEnumKey, type ResponseReasoningDeltaStreamingEvent, type ResponseReasoningDeltaStreamingEventTypeEnumKey, type ResponseReasoningDoneStreamingEvent, type ResponseReasoningDoneStreamingEventTypeEnumKey, type ResponseReasoningSummaryDeltaStreamingEvent, type ResponseReasoningSummaryDeltaStreamingEventTypeEnumKey, type ResponseReasoningSummaryDoneStreamingEvent, type ResponseReasoningSummaryDoneStreamingEventTypeEnumKey, type ResponseReasoningSummaryPartAddedStreamingEvent, type ResponseReasoningSummaryPartAddedStreamingEventTypeEnumKey, type ResponseReasoningSummaryPartDoneStreamingEvent, type ResponseReasoningSummaryPartDoneStreamingEventTypeEnumKey, type ResponseRefusalDeltaStreamingEvent, type ResponseRefusalDeltaStreamingEventTypeEnumKey, type ResponseRefusalDoneStreamingEvent, type ResponseRefusalDoneStreamingEventTypeEnumKey, type ResponseResource, type ResponseResourceObjectEnumKey, type ResponsesToolParam, type ServiceTierEnum, type ServiceTierEnumEnumKey, type SpecificFunctionParam, type SpecificFunctionParamTypeEnumKey, type SpecificToolChoiceParam, type StreamOptionsParam, type SummaryTextContent, type SummaryTextContentTypeEnumKey, type SystemMessageItemParam, type SystemMessageItemParamRoleEnumKey, type SystemMessageItemParamTypeEnumKey, TekimaxClient, TekimaxResponse, type TextContent, type TextContentTypeEnumKey, type TextField, type TextFormatParam, type TextParam, type TextResponseFormat, type TextResponseFormatTypeEnumKey, type Tool, type ToolChoiceParam, type ToolChoiceValueEnum, type ToolChoiceValueEnumEnumKey, type TopLogProb, type TruncationEnum, type TruncationEnumEnumKey, type UrlCitationBody, type UrlCitationBodyTypeEnumKey, type UrlCitationParam, type UrlCitationParamTypeEnumKey, type Usage, type UserMessageItemParam, type UserMessageItemParamRoleEnumKey, type UserMessageItemParamTypeEnumKey, type VerbosityEnum, type VerbosityEnumEnumKey, allowedToolChoiceSchema, allowedToolChoiceTypeEnum, allowedToolsParamSchema, allowedToolsParamTypeEnum, annotationSchema, assistantMessageItemParamRoleEnum, assistantMessageItemParamSchema, assistantMessageItemParamTypeEnum, createResponseBodySchema, createresponse200Schema, createresponseMutationRequestSchema, createresponseMutationResponseSchema, detailEnumEnum, detailEnumSchema, developerMessageItemParamRoleEnum, developerMessageItemParamSchema, developerMessageItemParamTypeEnum, emptyModelParamSchema, errorPayloadSchema, errorSchema, errorStreamingEventSchema, errorStreamingEventTypeEnum, functionCallItemParamSchema, functionCallItemParamTypeEnum, functionCallItemStatusEnum, functionCallItemStatusSchema, functionCallOutputItemParamSchema, functionCallOutputItemParamTypeEnum, functionCallOutputSchema, functionCallOutputStatusEnumEnum, functionCallOutputStatusEnumSchema, functionCallOutputTypeEnum, functionCallSchema, functionCallStatusEnum, functionCallStatusSchema, functionCallTypeEnum, functionToolChoiceSchema, functionToolChoiceTypeEnum, functionToolParamSchema, functionToolParamTypeEnum, functionToolSchema, functionToolTypeEnum, imageDetailEnum, imageDetailSchema, includeEnumEnum, includeEnumSchema, incompleteDetailsSchema, inputFileContentParamSchema, inputFileContentParamTypeEnum, inputFileContentSchema, inputFileContentTypeEnum, inputImageContentParamAutoParamSchema, inputImageContentParamAutoParamTypeEnum, inputImageContentSchema, inputImageContentTypeEnum, inputTextContentParamSchema, inputTextContentParamTypeEnum, inputTextContentSchema, inputTextContentTypeEnum, inputTokensDetailsSchema, inputVideoContentSchema, inputVideoContentTypeEnum, itemFieldSchema, itemParamSchema, itemReferenceParamSchema, itemReferenceParamTypeEnum, jsonObjectResponseFormatSchema, jsonObjectResponseFormatTypeEnum, jsonSchemaResponseFormatParamSchema, jsonSchemaResponseFormatParamTypeEnum, jsonSchemaResponseFormatSchema, jsonSchemaResponseFormatTypeEnum, logProbSchema, messageRoleEnum, messageRoleSchema, messageSchema, messageStatusEnum, messageStatusSchema, messageTypeEnum, metadataParamSchema, outputTextContentParamSchema, outputTextContentParamTypeEnum, outputTextContentSchema, outputTextContentTypeEnum, outputTokensDetailsSchema, reasoningBodySchema, reasoningBodyTypeEnum, reasoningEffortEnumEnum, reasoningEffortEnumSchema, reasoningItemParamSchema, reasoningItemParamTypeEnum, reasoningParamSchema, reasoningSchema, reasoningSummaryContentParamSchema, reasoningSummaryContentParamTypeEnum, reasoningSummaryEnumEnum, reasoningSummaryEnumSchema, reasoningTextContentSchema, reasoningTextContentTypeEnum, refusalContentParamSchema, refusalContentParamTypeEnum, refusalContentSchema, refusalContentTypeEnum, responseCompletedStreamingEventSchema, responseCompletedStreamingEventTypeEnum, responseContentPartAddedStreamingEventSchema, responseContentPartAddedStreamingEventTypeEnum, responseContentPartDoneStreamingEventSchema, responseContentPartDoneStreamingEventTypeEnum, responseCreatedStreamingEventSchema, responseCreatedStreamingEventTypeEnum, responseFailedStreamingEventSchema, responseFailedStreamingEventTypeEnum, responseFunctionCallArgumentsDeltaStreamingEventSchema, responseFunctionCallArgumentsDeltaStreamingEventTypeEnum, responseFunctionCallArgumentsDoneStreamingEventSchema, responseFunctionCallArgumentsDoneStreamingEventTypeEnum, responseInProgressStreamingEventSchema, responseInProgressStreamingEventTypeEnum, responseIncompleteStreamingEventSchema, responseIncompleteStreamingEventTypeEnum, responseOutputItemAddedStreamingEventSchema, responseOutputItemAddedStreamingEventTypeEnum, responseOutputItemDoneStreamingEventSchema, responseOutputItemDoneStreamingEventTypeEnum, responseOutputTextAnnotationAddedStreamingEventSchema, responseOutputTextAnnotationAddedStreamingEventTypeEnum, responseOutputTextDeltaStreamingEventSchema, responseOutputTextDeltaStreamingEventTypeEnum, responseOutputTextDoneStreamingEventSchema, responseOutputTextDoneStreamingEventTypeEnum, responseQueuedStreamingEventSchema, responseQueuedStreamingEventTypeEnum, responseReasoningDeltaStreamingEventSchema, responseReasoningDeltaStreamingEventTypeEnum, responseReasoningDoneStreamingEventSchema, responseReasoningDoneStreamingEventTypeEnum, responseReasoningSummaryDeltaStreamingEventSchema, responseReasoningSummaryDeltaStreamingEventTypeEnum, responseReasoningSummaryDoneStreamingEventSchema, responseReasoningSummaryDoneStreamingEventTypeEnum, responseReasoningSummaryPartAddedStreamingEventSchema, responseReasoningSummaryPartAddedStreamingEventTypeEnum, responseReasoningSummaryPartDoneStreamingEventSchema, responseReasoningSummaryPartDoneStreamingEventTypeEnum, responseRefusalDeltaStreamingEventSchema, responseRefusalDeltaStreamingEventTypeEnum, responseRefusalDoneStreamingEventSchema, responseRefusalDoneStreamingEventTypeEnum, responseResourceObjectEnum, responseResourceSchema, responsesToolParamSchema, serviceTierEnumEnum, serviceTierEnumSchema, specificFunctionParamSchema, specificFunctionParamTypeEnum, specificToolChoiceParamSchema, streamOptionsParamSchema, summaryTextContentSchema, summaryTextContentTypeEnum, systemMessageItemParamRoleEnum, systemMessageItemParamSchema, systemMessageItemParamTypeEnum, textContentSchema, textContentTypeEnum, textFieldSchema, textFormatParamSchema, textParamSchema, textResponseFormatSchema, textResponseFormatTypeEnum, toolChoiceParamSchema, toolChoiceValueEnumEnum, toolChoiceValueEnumSchema, toolSchema, topLogProbSchema, truncationEnumEnum, truncationEnumSchema, urlCitationBodySchema, urlCitationBodyTypeEnum, urlCitationParamSchema, urlCitationParamTypeEnum, usageSchema, userMessageItemParamRoleEnum, userMessageItemParamSchema, userMessageItemParamTypeEnum, verbosityEnumEnum, verbosityEnumSchema };
package/dist/index.js CHANGED
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
23
  TekimaxClient: () => TekimaxClient,
24
+ TekimaxResponse: () => TekimaxResponse,
24
25
  allowedToolChoiceSchema: () => allowedToolChoiceSchema,
25
26
  allowedToolChoiceTypeEnum: () => allowedToolChoiceTypeEnum,
26
27
  allowedToolsParamSchema: () => allowedToolsParamSchema,
@@ -1515,10 +1516,16 @@ var TekimaxResponse = class {
1515
1516
  */
1516
1517
  get text() {
1517
1518
  if (!this._raw.output) return void 0;
1518
- const textItem = this._raw.output.find(
1519
- (item) => item.type === "output_text"
1520
- );
1521
- return textItem?.text;
1519
+ for (const item of this._raw.output) {
1520
+ if (item.type === "message") {
1521
+ for (const contentPart of item.content) {
1522
+ if (contentPart.type === "output_text" || contentPart.type === "text") {
1523
+ return contentPart.text;
1524
+ }
1525
+ }
1526
+ }
1527
+ }
1528
+ return void 0;
1522
1529
  }
1523
1530
  /**
1524
1531
  * The ID of the response.
@@ -1599,6 +1606,7 @@ var TekimaxClient = class {
1599
1606
  // Annotate the CommonJS export names for ESM import in node:
1600
1607
  0 && (module.exports = {
1601
1608
  TekimaxClient,
1609
+ TekimaxResponse,
1602
1610
  allowedToolChoiceSchema,
1603
1611
  allowedToolChoiceTypeEnum,
1604
1612
  allowedToolsParamSchema,
package/dist/index.mjs CHANGED
@@ -1302,10 +1302,16 @@ var TekimaxResponse = class {
1302
1302
  */
1303
1303
  get text() {
1304
1304
  if (!this._raw.output) return void 0;
1305
- const textItem = this._raw.output.find(
1306
- (item) => item.type === "output_text"
1307
- );
1308
- return textItem?.text;
1305
+ for (const item of this._raw.output) {
1306
+ if (item.type === "message") {
1307
+ for (const contentPart of item.content) {
1308
+ if (contentPart.type === "output_text" || contentPart.type === "text") {
1309
+ return contentPart.text;
1310
+ }
1311
+ }
1312
+ }
1313
+ }
1314
+ return void 0;
1309
1315
  }
1310
1316
  /**
1311
1317
  * The ID of the response.
@@ -1385,6 +1391,7 @@ var TekimaxClient = class {
1385
1391
  };
1386
1392
  export {
1387
1393
  TekimaxClient,
1394
+ TekimaxResponse,
1388
1395
  allowedToolChoiceSchema,
1389
1396
  allowedToolChoiceTypeEnum,
1390
1397
  allowedToolsParamSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tekimax-ts",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Tekimax TypeScript SDK generated with Kubb",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -33,7 +33,6 @@
33
33
  "access": "public"
34
34
  },
35
35
  "dependencies": {
36
- "@kubb/plugin-ts": "^4.20.0",
37
36
  "zod": "^3.22.4"
38
37
  },
39
38
  "devDependencies": {
@@ -41,6 +40,7 @@
41
40
  "@kubb/core": "^4.15.0",
42
41
  "@kubb/plugin-client": "^4.20.0",
43
42
  "@kubb/plugin-oas": "^4.15.0",
43
+ "@kubb/plugin-ts": "^4.20.0",
44
44
  "@kubb/plugin-zod": "^4.15.0",
45
45
  "ts-node": "^10.9.2",
46
46
  "tsup": "^8.5.1",
package/src/client.ts CHANGED
@@ -21,13 +21,16 @@ export class TekimaxResponse {
21
21
  get text(): string | undefined {
22
22
  if (!this._raw.output) return undefined;
23
23
 
24
- // Find the first output item that is of type 'output_text'
25
- const textItem = this._raw.output.find(
26
- (item): item is Extract<typeof item, { type: "output_text" }> =>
27
- item.type === "output_text"
28
- );
29
-
30
- return textItem?.text;
24
+ for (const item of this._raw.output) {
25
+ if (item.type === "message") {
26
+ for (const contentPart of item.content) {
27
+ if (contentPart.type === "output_text" || contentPart.type === "text") {
28
+ return contentPart.text;
29
+ }
30
+ }
31
+ }
32
+ }
33
+ return undefined;
31
34
  }
32
35
 
33
36
  /**