tekimax-ts 0.1.0 → 0.1.1

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/README.md CHANGED
@@ -21,11 +21,7 @@ The **Tekimax TypeScript SDK** provides fully typed, standards-compliant interfa
21
21
  ## 📦 Installation
22
22
 
23
23
  ```bash
24
- # Install directly from GitHub (Release v0.1.0)
25
- npm install github:TEKIMAX/tekimax-ts#v0.1.0
26
-
27
- # 🔜 Coming Soon to npm
28
- # npm install tekimax-ts
24
+ npm install tekimax-ts
29
25
  ```
30
26
 
31
27
  ## 💻 Usage
package/kubb.config.ts CHANGED
@@ -2,6 +2,7 @@ import { defineConfig } from "@kubb/core";
2
2
  import { pluginTs } from "@kubb/plugin-ts";
3
3
  import { pluginZod } from "@kubb/plugin-zod";
4
4
  import { pluginOas } from "@kubb/plugin-oas";
5
+ import { pluginClient } from "@kubb/plugin-client";
5
6
 
6
7
  export default defineConfig({
7
8
  root: ".",
@@ -20,6 +21,11 @@ export default defineConfig({
20
21
  },
21
22
  enumType: "asConst",
22
23
  }),
24
+ pluginClient({
25
+ output: {
26
+ path: "./client",
27
+ },
28
+ }),
23
29
  pluginZod({
24
30
  output: {
25
31
  path: "./zod",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tekimax-ts",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Tekimax TypeScript SDK generated with Kubb",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -39,6 +39,7 @@
39
39
  "devDependencies": {
40
40
  "@kubb/cli": "^4.15.0",
41
41
  "@kubb/core": "^4.15.0",
42
+ "@kubb/plugin-client": "^4.20.0",
42
43
  "@kubb/plugin-oas": "^4.15.0",
43
44
  "@kubb/plugin-zod": "^4.15.0",
44
45
  "ts-node": "^10.9.2",
@@ -0,0 +1,43 @@
1
+ export function buildFormData<T = unknown>(data: T): FormData {
2
+ const formData = new FormData()
3
+
4
+ function appendData(key: string, value: any) {
5
+ if (value instanceof Blob) {
6
+ formData.append(key, value)
7
+ return
8
+ }
9
+ if (value instanceof Date) {
10
+ formData.append(key, value.toISOString())
11
+ return
12
+ }
13
+ if (typeof value === 'number' || typeof value === 'boolean') {
14
+ formData.append(key, String(value))
15
+ return
16
+ }
17
+ if (typeof value === 'string') {
18
+ formData.append(key, value)
19
+ return
20
+ }
21
+ if (typeof value === 'object') {
22
+ formData.append(key, new Blob([JSON.stringify(value)], { type: 'application/json' }))
23
+ return
24
+ }
25
+ }
26
+
27
+ if (data) {
28
+ Object.entries(data).forEach(([key, value]) => {
29
+ if (value === undefined || value === null) return
30
+
31
+ if (Array.isArray(value)) {
32
+ for (const valueItem of value) {
33
+ if (valueItem === undefined || valueItem === null) continue
34
+ appendData(key, valueItem)
35
+ }
36
+ } else {
37
+ appendData(key, value)
38
+ }
39
+ })
40
+ }
41
+
42
+ return formData
43
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
6
+ import fetch from "@kubb/plugin-client/clients/axios";
7
+ import type { CreateresponseMutationRequest, CreateresponseMutationResponse } from "../types.ts";
8
+ import type { RequestConfig, ResponseErrorConfig } from "@kubb/plugin-client/clients/axios";
9
+
10
+ function getCreateresponseUrl() {
11
+ const res = { method: 'POST', url: `/responses` as const }
12
+ return res
13
+ }
14
+
15
+ /**
16
+ * @description Creates a response.
17
+ * @summary Create response
18
+ * {@link /responses}
19
+ */
20
+ export async function createresponse(data?: CreateresponseMutationRequest, config: Partial<RequestConfig<CreateresponseMutationRequest>> & { client?: typeof fetch } = {}) {
21
+ const { client: request = fetch, ...requestConfig } = config
22
+
23
+ const requestData = data
24
+
25
+ const res = await request<CreateresponseMutationResponse, ResponseErrorConfig<Error>, CreateresponseMutationRequest>({ method : "POST", url : getCreateresponseUrl().url.toString(), data : requestData, ... requestConfig })
26
+ return res.data
27
+ }
@@ -0,0 +1 @@
1
+ export { createresponse } from "./createresponse.ts";
package/src/gen/index.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export type { ItemReferenceParamTypeEnumKey, ItemReferenceParam, ReasoningSummaryContentParamTypeEnumKey, ReasoningSummaryContentParam, ReasoningItemParamTypeEnumKey, ReasoningItemParam, InputTextContentParamTypeEnumKey, InputTextContentParam, DetailEnumEnumKey, DetailEnum, ImageDetailEnumKey, ImageDetail, InputImageContentParamAutoParamTypeEnumKey, InputImageContentParamAutoParam, InputFileContentParamTypeEnumKey, InputFileContentParam, UserMessageItemParamTypeEnumKey, UserMessageItemParamRoleEnumKey, UserMessageItemParam, SystemMessageItemParamTypeEnumKey, SystemMessageItemParamRoleEnumKey, SystemMessageItemParam, DeveloperMessageItemParamTypeEnumKey, DeveloperMessageItemParamRoleEnumKey, DeveloperMessageItemParam, UrlCitationParamTypeEnumKey, UrlCitationParam, OutputTextContentParamTypeEnumKey, OutputTextContentParam, RefusalContentParamTypeEnumKey, RefusalContentParam, AssistantMessageItemParamTypeEnumKey, AssistantMessageItemParamRoleEnumKey, AssistantMessageItemParam, FunctionCallItemStatusEnumKey, FunctionCallItemStatus, FunctionCallStatusEnumKey, FunctionCallStatus, FunctionCallItemParamTypeEnumKey, FunctionCallItemParam, InputVideoContentTypeEnumKey, InputVideoContent, FunctionCallOutputItemParamTypeEnumKey, FunctionCallOutputItemParam, ItemParam, IncludeEnumEnumKey, IncludeEnum, EmptyModelParam, FunctionToolParamTypeEnumKey, FunctionToolParam, ResponsesToolParam, SpecificFunctionParamTypeEnumKey, SpecificFunctionParam, SpecificToolChoiceParam, ToolChoiceValueEnumEnumKey, ToolChoiceValueEnum, AllowedToolsParamTypeEnumKey, AllowedToolsParam, ToolChoiceParam, MetadataParam, VerbosityEnumEnumKey, VerbosityEnum, TextResponseFormatTypeEnumKey, TextResponseFormat, JsonSchemaResponseFormatParamTypeEnumKey, JsonSchemaResponseFormatParam, TextFormatParam, TextParam, StreamOptionsParam, ReasoningEffortEnumEnumKey, ReasoningEffortEnum, ReasoningSummaryEnumEnumKey, ReasoningSummaryEnum, ReasoningParam, TruncationEnumEnumKey, TruncationEnum, ServiceTierEnumEnumKey, ServiceTierEnum, CreateResponseBody, IncompleteDetails, MessageRoleEnumKey, MessageRole, InputTextContentTypeEnumKey, InputTextContent, UrlCitationBodyTypeEnumKey, UrlCitationBody, Annotation, TopLogProb, LogProb, OutputTextContentTypeEnumKey, OutputTextContent, TextContentTypeEnumKey, TextContent, SummaryTextContentTypeEnumKey, SummaryTextContent, ReasoningTextContentTypeEnumKey, ReasoningTextContent, RefusalContentTypeEnumKey, RefusalContent, InputImageContentTypeEnumKey, InputImageContent, InputFileContentTypeEnumKey, InputFileContent, MessageStatusEnumKey, MessageStatus, MessageTypeEnumKey, Message, FunctionCallTypeEnumKey, FunctionCall, FunctionCallOutputStatusEnumEnumKey, FunctionCallOutputStatusEnum, FunctionCallOutputTypeEnumKey, FunctionCallOutput, ReasoningBodyTypeEnumKey, ReasoningBody, ItemField, Error, FunctionToolTypeEnumKey, FunctionTool, Tool, FunctionToolChoiceTypeEnumKey, FunctionToolChoice, AllowedToolChoiceTypeEnumKey, AllowedToolChoice, JsonObjectResponseFormatTypeEnumKey, JsonObjectResponseFormat, JsonSchemaResponseFormatTypeEnumKey, JsonSchemaResponseFormat, TextField, Reasoning, InputTokensDetails, OutputTokensDetails, Usage, ResponseResourceObjectEnumKey, ResponseResource, ResponseCreatedStreamingEventTypeEnumKey, ResponseCreatedStreamingEvent, ResponseQueuedStreamingEventTypeEnumKey, ResponseQueuedStreamingEvent, ResponseInProgressStreamingEventTypeEnumKey, ResponseInProgressStreamingEvent, ResponseCompletedStreamingEventTypeEnumKey, ResponseCompletedStreamingEvent, ResponseFailedStreamingEventTypeEnumKey, ResponseFailedStreamingEvent, ResponseIncompleteStreamingEventTypeEnumKey, ResponseIncompleteStreamingEvent, ResponseOutputItemAddedStreamingEventTypeEnumKey, ResponseOutputItemAddedStreamingEvent, ResponseOutputItemDoneStreamingEventTypeEnumKey, ResponseOutputItemDoneStreamingEvent, ResponseReasoningSummaryPartAddedStreamingEventTypeEnumKey, ResponseReasoningSummaryPartAddedStreamingEvent, ResponseReasoningSummaryPartDoneStreamingEventTypeEnumKey, ResponseReasoningSummaryPartDoneStreamingEvent, ResponseContentPartAddedStreamingEventTypeEnumKey, ResponseContentPartAddedStreamingEvent, ResponseContentPartDoneStreamingEventTypeEnumKey, ResponseContentPartDoneStreamingEvent, ResponseOutputTextDeltaStreamingEventTypeEnumKey, ResponseOutputTextDeltaStreamingEvent, ResponseOutputTextDoneStreamingEventTypeEnumKey, ResponseOutputTextDoneStreamingEvent, ResponseRefusalDeltaStreamingEventTypeEnumKey, ResponseRefusalDeltaStreamingEvent, ResponseRefusalDoneStreamingEventTypeEnumKey, ResponseRefusalDoneStreamingEvent, ResponseReasoningDeltaStreamingEventTypeEnumKey, ResponseReasoningDeltaStreamingEvent, ResponseReasoningDoneStreamingEventTypeEnumKey, ResponseReasoningDoneStreamingEvent, ResponseReasoningSummaryDeltaStreamingEventTypeEnumKey, ResponseReasoningSummaryDeltaStreamingEvent, ResponseReasoningSummaryDoneStreamingEventTypeEnumKey, ResponseReasoningSummaryDoneStreamingEvent, ResponseOutputTextAnnotationAddedStreamingEventTypeEnumKey, ResponseOutputTextAnnotationAddedStreamingEvent, ResponseFunctionCallArgumentsDeltaStreamingEventTypeEnumKey, ResponseFunctionCallArgumentsDeltaStreamingEvent, ResponseFunctionCallArgumentsDoneStreamingEventTypeEnumKey, ResponseFunctionCallArgumentsDoneStreamingEvent, ErrorPayload, ErrorStreamingEventTypeEnumKey, ErrorStreamingEvent, Createresponse200, CreateresponseMutationRequest, CreateresponseMutationResponse, CreateresponseMutation } from "./types.ts";
2
+ export { createresponse } from "./client/createresponse.ts";
2
3
  export { itemReferenceParamTypeEnum } from "./types.ts";
3
4
  export { reasoningSummaryContentParamTypeEnum } from "./types.ts";
4
5
  export { reasoningItemParamTypeEnum } from "./types.ts";