syllable-sdk 0.1.0-alpha.5 → 0.1.0-alpha.6
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 +18 -2
- package/docs/sdks/prompts/README.md +78 -0
- package/docs/sdks/services/README.md +245 -0
- package/docs/sdks/syllablesdk/README.md +3 -2
- package/docs/sdks/tools/README.md +163 -1
- package/docs/sdks/transcript/README.md +2 -0
- package/funcs/promptsPromptsHistory.d.ts +17 -0
- package/funcs/promptsPromptsHistory.d.ts.map +1 -0
- package/funcs/promptsPromptsHistory.js +106 -0
- package/funcs/promptsPromptsHistory.js.map +1 -0
- package/funcs/servicesCreate.d.ts +13 -0
- package/funcs/servicesCreate.d.ts.map +1 -0
- package/funcs/servicesCreate.js +96 -0
- package/funcs/servicesCreate.js.map +1 -0
- package/funcs/servicesList.d.ts +17 -0
- package/funcs/servicesList.d.ts.map +1 -0
- package/funcs/servicesList.js +111 -0
- package/funcs/servicesList.js.map +1 -0
- package/funcs/servicesUpdate.d.ts +13 -0
- package/funcs/servicesUpdate.d.ts.map +1 -0
- package/funcs/servicesUpdate.js +96 -0
- package/funcs/servicesUpdate.js.map +1 -0
- package/funcs/toolsCreate.d.ts +16 -0
- package/funcs/toolsCreate.d.ts.map +1 -0
- package/funcs/toolsCreate.js +99 -0
- package/funcs/toolsCreate.js.map +1 -0
- package/funcs/toolsList.d.ts +1 -1
- package/funcs/toolsList.js +1 -1
- package/funcs/toolsUpdate.d.ts +16 -0
- package/funcs/toolsUpdate.d.ts.map +1 -0
- package/funcs/toolsUpdate.js +99 -0
- package/funcs/toolsUpdate.js.map +1 -0
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/components/channel.d.ts +3 -0
- package/models/components/channel.d.ts.map +1 -1
- package/models/components/channel.js.map +1 -1
- package/models/components/index.d.ts +8 -2
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +8 -2
- package/models/components/index.js.map +1 -1
- package/models/components/listresponseservice.d.ts +38 -0
- package/models/components/listresponseservice.d.ts.map +1 -0
- package/models/components/listresponseservice.js +81 -0
- package/models/components/listresponseservice.js.map +1 -0
- package/models/components/llmconfig.d.ts +34 -3
- package/models/components/llmconfig.d.ts.map +1 -1
- package/models/components/llmconfig.js +26 -4
- package/models/components/llmconfig.js.map +1 -1
- package/models/components/prompt.d.ts +13 -0
- package/models/components/prompt.d.ts.map +1 -1
- package/models/components/prompt.js +8 -0
- package/models/components/prompt.js.map +1 -1
- package/models/components/promptcreate.d.ts +3 -0
- package/models/components/promptcreate.d.ts.map +1 -1
- package/models/components/promptcreate.js.map +1 -1
- package/models/components/prompthistory.d.ts +41 -0
- package/models/components/prompthistory.d.ts.map +1 -0
- package/models/components/prompthistory.js +88 -0
- package/models/components/prompthistory.js.map +1 -0
- package/models/components/promptproperties.d.ts +3 -0
- package/models/components/promptproperties.d.ts.map +1 -1
- package/models/components/promptproperties.js +1 -0
- package/models/components/promptproperties.js.map +1 -1
- package/models/components/service.d.ts +47 -0
- package/models/components/service.d.ts.map +1 -0
- package/models/components/{provider.js → service.js} +30 -19
- package/models/components/service.js.map +1 -0
- package/models/components/servicecreate.d.ts +37 -0
- package/models/components/servicecreate.d.ts.map +1 -0
- package/models/components/servicecreate.js +61 -0
- package/models/components/servicecreate.js.map +1 -0
- package/models/components/serviceproperties.d.ts +28 -0
- package/models/components/serviceproperties.d.ts.map +1 -0
- package/models/components/{orderbydirection.js → serviceproperties.js} +14 -14
- package/models/components/serviceproperties.js.map +1 -0
- package/models/components/serviceupdate.d.ts +42 -0
- package/models/components/serviceupdate.d.ts.map +1 -0
- package/models/components/serviceupdate.js +63 -0
- package/models/components/serviceupdate.js.map +1 -0
- package/models/components/toolcreate.d.ts +66 -0
- package/models/components/toolcreate.d.ts.map +1 -0
- package/models/components/toolcreate.js +95 -0
- package/models/components/toolcreate.js.map +1 -0
- package/models/components/toolupdate.d.ts +71 -0
- package/models/components/toolupdate.d.ts.map +1 -0
- package/models/components/toolupdate.js +97 -0
- package/models/components/toolupdate.js.map +1 -0
- package/models/operations/agentlist.d.ts +77 -2
- package/models/operations/agentlist.d.ts.map +1 -1
- package/models/operations/agentlist.js +52 -5
- package/models/operations/agentlist.js.map +1 -1
- package/models/operations/availabletargets.d.ts +56 -2
- package/models/operations/availabletargets.d.ts.map +1 -1
- package/models/operations/availabletargets.js +47 -5
- package/models/operations/availabletargets.js.map +1 -1
- package/models/operations/channelslist.d.ts +59 -2
- package/models/operations/channelslist.d.ts.map +1 -1
- package/models/operations/channelslist.js +45 -5
- package/models/operations/channelslist.js.map +1 -1
- package/models/operations/channeltargetslist.d.ts +71 -2
- package/models/operations/channeltargetslist.d.ts.map +1 -1
- package/models/operations/channeltargetslist.js +52 -5
- package/models/operations/channeltargetslist.js.map +1 -1
- package/models/operations/conversationslist.d.ts +77 -2
- package/models/operations/conversationslist.d.ts.map +1 -1
- package/models/operations/conversationslist.js +54 -5
- package/models/operations/conversationslist.js.map +1 -1
- package/models/operations/custommessageslist.d.ts +56 -2
- package/models/operations/custommessageslist.d.ts.map +1 -1
- package/models/operations/custommessageslist.js +47 -5
- package/models/operations/custommessageslist.js.map +1 -1
- package/models/operations/eventslist.d.ts +77 -2
- package/models/operations/eventslist.d.ts.map +1 -1
- package/models/operations/eventslist.js +53 -5
- package/models/operations/eventslist.js.map +1 -1
- package/models/operations/index.d.ts +2 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/promptshistory.d.ts +29 -0
- package/models/operations/promptshistory.d.ts.map +1 -0
- package/models/operations/promptshistory.js +68 -0
- package/models/operations/promptshistory.js.map +1 -0
- package/models/operations/promptslist.d.ts +65 -2
- package/models/operations/promptslist.d.ts.map +1 -1
- package/models/operations/promptslist.js +49 -5
- package/models/operations/promptslist.js.map +1 -1
- package/models/operations/servicelist.d.ts +97 -0
- package/models/operations/servicelist.d.ts.map +1 -0
- package/models/operations/servicelist.js +137 -0
- package/models/operations/servicelist.js.map +1 -0
- package/models/operations/sessionlabelslist.d.ts +68 -2
- package/models/operations/sessionlabelslist.d.ts.map +1 -1
- package/models/operations/sessionlabelslist.js +51 -5
- package/models/operations/sessionlabelslist.js.map +1 -1
- package/models/operations/sessionslist.d.ts +95 -2
- package/models/operations/sessionslist.d.ts.map +1 -1
- package/models/operations/sessionslist.js +59 -5
- package/models/operations/sessionslist.js.map +1 -1
- package/models/operations/toollist.d.ts +62 -2
- package/models/operations/toollist.d.ts.map +1 -1
- package/models/operations/toollist.js +48 -5
- package/models/operations/toollist.js.map +1 -1
- package/package.json +1 -1
- package/sdk/prompts.d.ts +7 -0
- package/sdk/prompts.d.ts.map +1 -1
- package/sdk/prompts.js +10 -0
- package/sdk/prompts.js.map +1 -1
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +5 -0
- package/sdk/sdk.js.map +1 -1
- package/sdk/services.d.ts +21 -0
- package/sdk/services.d.ts.map +1 -0
- package/sdk/services.js +36 -0
- package/sdk/services.js.map +1 -0
- package/sdk/tools.d.ts +15 -1
- package/sdk/tools.d.ts.map +1 -1
- package/sdk/tools.js +21 -1
- package/sdk/tools.js.map +1 -1
- package/src/funcs/promptsPromptsHistory.ts +139 -0
- package/src/funcs/servicesCreate.ts +128 -0
- package/src/funcs/servicesList.ts +144 -0
- package/src/funcs/servicesUpdate.ts +128 -0
- package/src/funcs/toolsCreate.ts +131 -0
- package/src/funcs/toolsList.ts +1 -1
- package/src/funcs/toolsUpdate.ts +131 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/channel.ts +3 -0
- package/src/models/components/index.ts +8 -2
- package/src/models/components/listresponseservice.ts +101 -0
- package/src/models/components/llmconfig.ts +36 -9
- package/src/models/components/prompt.ts +21 -0
- package/src/models/components/promptcreate.ts +3 -0
- package/src/models/components/prompthistory.ts +103 -0
- package/src/models/components/promptproperties.ts +1 -0
- package/src/models/components/service.ts +83 -0
- package/src/models/components/servicecreate.ts +72 -0
- package/src/models/components/serviceproperties.ts +33 -0
- package/src/models/components/serviceupdate.ts +79 -0
- package/src/models/components/toolcreate.ts +141 -0
- package/src/models/components/toolupdate.ts +148 -0
- package/src/models/operations/agentlist.ts +67 -6
- package/src/models/operations/availabletargets.ts +71 -6
- package/src/models/operations/channelslist.ts +65 -6
- package/src/models/operations/channeltargetslist.ts +77 -6
- package/src/models/operations/conversationslist.ts +78 -6
- package/src/models/operations/custommessageslist.ts +72 -6
- package/src/models/operations/eventslist.ts +78 -6
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/promptshistory.ts +75 -0
- package/src/models/operations/promptslist.ts +74 -6
- package/src/models/operations/servicelist.ts +184 -0
- package/src/models/operations/sessionlabelslist.ts +75 -6
- package/src/models/operations/sessionslist.ts +84 -6
- package/src/models/operations/toollist.ts +71 -6
- package/src/sdk/prompts.ts +18 -0
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/services.ts +58 -0
- package/src/sdk/tools.ts +37 -1
- package/models/components/orderbydirection.d.ts +0 -28
- package/models/components/orderbydirection.d.ts.map +0 -1
- package/models/components/orderbydirection.js.map +0 -1
- package/models/components/provider.d.ts +0 -34
- package/models/components/provider.d.ts.map +0 -1
- package/models/components/provider.js.map +0 -1
- package/src/models/components/orderbydirection.ts +0 -33
- package/src/models/components/provider.ts +0 -37
|
@@ -5,17 +5,25 @@
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Provider of the LLM model.
|
|
14
|
+
*/
|
|
15
|
+
export const Provider = {
|
|
16
|
+
AzureOpenai: "azure_openai",
|
|
17
|
+
Openai: "openai",
|
|
18
|
+
} as const;
|
|
19
|
+
/**
|
|
20
|
+
* Provider of the LLM model.
|
|
21
|
+
*/
|
|
22
|
+
export type Provider = ClosedEnum<typeof Provider>;
|
|
15
23
|
|
|
16
24
|
export type LlmConfig = {
|
|
17
25
|
/**
|
|
18
|
-
* LLM
|
|
26
|
+
* Provider of the LLM model.
|
|
19
27
|
*/
|
|
20
28
|
provider?: Provider | undefined;
|
|
21
29
|
/**
|
|
@@ -32,13 +40,32 @@ export type LlmConfig = {
|
|
|
32
40
|
apiVersion?: string | null | undefined;
|
|
33
41
|
};
|
|
34
42
|
|
|
43
|
+
/** @internal */
|
|
44
|
+
export const Provider$inboundSchema: z.ZodNativeEnum<typeof Provider> = z
|
|
45
|
+
.nativeEnum(Provider);
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export const Provider$outboundSchema: z.ZodNativeEnum<typeof Provider> =
|
|
49
|
+
Provider$inboundSchema;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @internal
|
|
53
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
54
|
+
*/
|
|
55
|
+
export namespace Provider$ {
|
|
56
|
+
/** @deprecated use `Provider$inboundSchema` instead. */
|
|
57
|
+
export const inboundSchema = Provider$inboundSchema;
|
|
58
|
+
/** @deprecated use `Provider$outboundSchema` instead. */
|
|
59
|
+
export const outboundSchema = Provider$outboundSchema;
|
|
60
|
+
}
|
|
61
|
+
|
|
35
62
|
/** @internal */
|
|
36
63
|
export const LlmConfig$inboundSchema: z.ZodType<
|
|
37
64
|
LlmConfig,
|
|
38
65
|
z.ZodTypeDef,
|
|
39
66
|
unknown
|
|
40
67
|
> = z.object({
|
|
41
|
-
provider: Provider$inboundSchema.
|
|
68
|
+
provider: Provider$inboundSchema.default("azure_openai"),
|
|
42
69
|
model: z.string().default("gpt-4o"),
|
|
43
70
|
version: z.nullable(z.string()).optional(),
|
|
44
71
|
api_version: z.nullable(z.string()).optional(),
|
|
@@ -50,7 +77,7 @@ export const LlmConfig$inboundSchema: z.ZodType<
|
|
|
50
77
|
|
|
51
78
|
/** @internal */
|
|
52
79
|
export type LlmConfig$Outbound = {
|
|
53
|
-
provider
|
|
80
|
+
provider: string;
|
|
54
81
|
model: string;
|
|
55
82
|
version?: string | null | undefined;
|
|
56
83
|
api_version?: string | null | undefined;
|
|
@@ -62,7 +89,7 @@ export const LlmConfig$outboundSchema: z.ZodType<
|
|
|
62
89
|
z.ZodTypeDef,
|
|
63
90
|
LlmConfig
|
|
64
91
|
> = z.object({
|
|
65
|
-
provider: Provider$outboundSchema.
|
|
92
|
+
provider: Provider$outboundSchema.default("azure_openai"),
|
|
66
93
|
model: z.string().default("gpt-4o"),
|
|
67
94
|
version: z.nullable(z.string()).optional(),
|
|
68
95
|
apiVersion: z.nullable(z.string()).optional(),
|
|
@@ -31,6 +31,9 @@ export type Prompt = {
|
|
|
31
31
|
* The tools for the prompt
|
|
32
32
|
*/
|
|
33
33
|
tools?: Array<string> | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* The configuration for the language model used by the Cortex API.
|
|
36
|
+
*/
|
|
34
37
|
llmConfig: LlmConfig;
|
|
35
38
|
/**
|
|
36
39
|
* The Prompt ID
|
|
@@ -40,6 +43,14 @@ export type Prompt = {
|
|
|
40
43
|
* The last updated date of the prompt
|
|
41
44
|
*/
|
|
42
45
|
lastUpdated: string | null;
|
|
46
|
+
/**
|
|
47
|
+
* The last updated user who last updated of the prompt
|
|
48
|
+
*/
|
|
49
|
+
lastUpdatedBy?: string | null | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* The comments for the last edit
|
|
52
|
+
*/
|
|
53
|
+
editComments?: string | null | undefined;
|
|
43
54
|
};
|
|
44
55
|
|
|
45
56
|
/** @internal */
|
|
@@ -52,10 +63,14 @@ export const Prompt$inboundSchema: z.ZodType<Prompt, z.ZodTypeDef, unknown> = z
|
|
|
52
63
|
llm_config: LlmConfig$inboundSchema,
|
|
53
64
|
id: z.number().int(),
|
|
54
65
|
last_updated: z.nullable(z.string()),
|
|
66
|
+
last_updated_by: z.nullable(z.string()).optional(),
|
|
67
|
+
edit_comments: z.nullable(z.string()).optional(),
|
|
55
68
|
}).transform((v) => {
|
|
56
69
|
return remap$(v, {
|
|
57
70
|
"llm_config": "llmConfig",
|
|
58
71
|
"last_updated": "lastUpdated",
|
|
72
|
+
"last_updated_by": "lastUpdatedBy",
|
|
73
|
+
"edit_comments": "editComments",
|
|
59
74
|
});
|
|
60
75
|
});
|
|
61
76
|
|
|
@@ -68,6 +83,8 @@ export type Prompt$Outbound = {
|
|
|
68
83
|
llm_config: LlmConfig$Outbound;
|
|
69
84
|
id: number;
|
|
70
85
|
last_updated: string | null;
|
|
86
|
+
last_updated_by?: string | null | undefined;
|
|
87
|
+
edit_comments?: string | null | undefined;
|
|
71
88
|
};
|
|
72
89
|
|
|
73
90
|
/** @internal */
|
|
@@ -83,10 +100,14 @@ export const Prompt$outboundSchema: z.ZodType<
|
|
|
83
100
|
llmConfig: LlmConfig$outboundSchema,
|
|
84
101
|
id: z.number().int(),
|
|
85
102
|
lastUpdated: z.nullable(z.string()),
|
|
103
|
+
lastUpdatedBy: z.nullable(z.string()).optional(),
|
|
104
|
+
editComments: z.nullable(z.string()).optional(),
|
|
86
105
|
}).transform((v) => {
|
|
87
106
|
return remap$(v, {
|
|
88
107
|
llmConfig: "llm_config",
|
|
89
108
|
lastUpdated: "last_updated",
|
|
109
|
+
lastUpdatedBy: "last_updated_by",
|
|
110
|
+
editComments: "edit_comments",
|
|
90
111
|
});
|
|
91
112
|
});
|
|
92
113
|
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type PromptHistory = {
|
|
12
|
+
timestamp: Date;
|
|
13
|
+
promptId?: string | null | undefined;
|
|
14
|
+
promptText?: string | null | undefined;
|
|
15
|
+
promptName?: string | null | undefined;
|
|
16
|
+
llmConfig?: string | null | undefined;
|
|
17
|
+
comments?: string | null | undefined;
|
|
18
|
+
userEmail?: string | null | undefined;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const PromptHistory$inboundSchema: z.ZodType<
|
|
23
|
+
PromptHistory,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
timestamp: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
28
|
+
prompt_id: z.nullable(z.string()).optional(),
|
|
29
|
+
prompt_text: z.nullable(z.string()).optional(),
|
|
30
|
+
prompt_name: z.nullable(z.string()).optional(),
|
|
31
|
+
llm_config: z.nullable(z.string()).optional(),
|
|
32
|
+
comments: z.nullable(z.string()).optional(),
|
|
33
|
+
user_email: z.nullable(z.string()).optional(),
|
|
34
|
+
}).transform((v) => {
|
|
35
|
+
return remap$(v, {
|
|
36
|
+
"prompt_id": "promptId",
|
|
37
|
+
"prompt_text": "promptText",
|
|
38
|
+
"prompt_name": "promptName",
|
|
39
|
+
"llm_config": "llmConfig",
|
|
40
|
+
"user_email": "userEmail",
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export type PromptHistory$Outbound = {
|
|
46
|
+
timestamp: string;
|
|
47
|
+
prompt_id?: string | null | undefined;
|
|
48
|
+
prompt_text?: string | null | undefined;
|
|
49
|
+
prompt_name?: string | null | undefined;
|
|
50
|
+
llm_config?: string | null | undefined;
|
|
51
|
+
comments?: string | null | undefined;
|
|
52
|
+
user_email?: string | null | undefined;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/** @internal */
|
|
56
|
+
export const PromptHistory$outboundSchema: z.ZodType<
|
|
57
|
+
PromptHistory$Outbound,
|
|
58
|
+
z.ZodTypeDef,
|
|
59
|
+
PromptHistory
|
|
60
|
+
> = z.object({
|
|
61
|
+
timestamp: z.date().transform(v => v.toISOString()),
|
|
62
|
+
promptId: z.nullable(z.string()).optional(),
|
|
63
|
+
promptText: z.nullable(z.string()).optional(),
|
|
64
|
+
promptName: z.nullable(z.string()).optional(),
|
|
65
|
+
llmConfig: z.nullable(z.string()).optional(),
|
|
66
|
+
comments: z.nullable(z.string()).optional(),
|
|
67
|
+
userEmail: z.nullable(z.string()).optional(),
|
|
68
|
+
}).transform((v) => {
|
|
69
|
+
return remap$(v, {
|
|
70
|
+
promptId: "prompt_id",
|
|
71
|
+
promptText: "prompt_text",
|
|
72
|
+
promptName: "prompt_name",
|
|
73
|
+
llmConfig: "llm_config",
|
|
74
|
+
userEmail: "user_email",
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* @internal
|
|
80
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
81
|
+
*/
|
|
82
|
+
export namespace PromptHistory$ {
|
|
83
|
+
/** @deprecated use `PromptHistory$inboundSchema` instead. */
|
|
84
|
+
export const inboundSchema = PromptHistory$inboundSchema;
|
|
85
|
+
/** @deprecated use `PromptHistory$outboundSchema` instead. */
|
|
86
|
+
export const outboundSchema = PromptHistory$outboundSchema;
|
|
87
|
+
/** @deprecated use `PromptHistory$Outbound` instead. */
|
|
88
|
+
export type Outbound = PromptHistory$Outbound;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function promptHistoryToJSON(promptHistory: PromptHistory): string {
|
|
92
|
+
return JSON.stringify(PromptHistory$outboundSchema.parse(promptHistory));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function promptHistoryFromJSON(
|
|
96
|
+
jsonString: string,
|
|
97
|
+
): SafeParseResult<PromptHistory, SDKValidationError> {
|
|
98
|
+
return safeParse(
|
|
99
|
+
jsonString,
|
|
100
|
+
(x) => PromptHistory$inboundSchema.parse(JSON.parse(x)),
|
|
101
|
+
`Failed to parse 'PromptHistory' from JSON`,
|
|
102
|
+
);
|
|
103
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type Service = {
|
|
11
|
+
/**
|
|
12
|
+
* The name of the service
|
|
13
|
+
*/
|
|
14
|
+
name: string;
|
|
15
|
+
/**
|
|
16
|
+
* The description of the service
|
|
17
|
+
*/
|
|
18
|
+
description: string;
|
|
19
|
+
/**
|
|
20
|
+
* The ID of the service
|
|
21
|
+
*/
|
|
22
|
+
id: number;
|
|
23
|
+
/**
|
|
24
|
+
* The tools of the service
|
|
25
|
+
*/
|
|
26
|
+
tools: Array<string>;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const Service$inboundSchema: z.ZodType<Service, z.ZodTypeDef, unknown> =
|
|
31
|
+
z.object({
|
|
32
|
+
name: z.string(),
|
|
33
|
+
description: z.string(),
|
|
34
|
+
id: z.number().int(),
|
|
35
|
+
tools: z.array(z.string()),
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type Service$Outbound = {
|
|
40
|
+
name: string;
|
|
41
|
+
description: string;
|
|
42
|
+
id: number;
|
|
43
|
+
tools: Array<string>;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const Service$outboundSchema: z.ZodType<
|
|
48
|
+
Service$Outbound,
|
|
49
|
+
z.ZodTypeDef,
|
|
50
|
+
Service
|
|
51
|
+
> = z.object({
|
|
52
|
+
name: z.string(),
|
|
53
|
+
description: z.string(),
|
|
54
|
+
id: z.number().int(),
|
|
55
|
+
tools: z.array(z.string()),
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @internal
|
|
60
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
61
|
+
*/
|
|
62
|
+
export namespace Service$ {
|
|
63
|
+
/** @deprecated use `Service$inboundSchema` instead. */
|
|
64
|
+
export const inboundSchema = Service$inboundSchema;
|
|
65
|
+
/** @deprecated use `Service$outboundSchema` instead. */
|
|
66
|
+
export const outboundSchema = Service$outboundSchema;
|
|
67
|
+
/** @deprecated use `Service$Outbound` instead. */
|
|
68
|
+
export type Outbound = Service$Outbound;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function serviceToJSON(service: Service): string {
|
|
72
|
+
return JSON.stringify(Service$outboundSchema.parse(service));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function serviceFromJSON(
|
|
76
|
+
jsonString: string,
|
|
77
|
+
): SafeParseResult<Service, SDKValidationError> {
|
|
78
|
+
return safeParse(
|
|
79
|
+
jsonString,
|
|
80
|
+
(x) => Service$inboundSchema.parse(JSON.parse(x)),
|
|
81
|
+
`Failed to parse 'Service' from JSON`,
|
|
82
|
+
);
|
|
83
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type ServiceCreate = {
|
|
11
|
+
/**
|
|
12
|
+
* The name of the service
|
|
13
|
+
*/
|
|
14
|
+
name: string;
|
|
15
|
+
/**
|
|
16
|
+
* The description of the service
|
|
17
|
+
*/
|
|
18
|
+
description: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const ServiceCreate$inboundSchema: z.ZodType<
|
|
23
|
+
ServiceCreate,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
name: z.string(),
|
|
28
|
+
description: z.string(),
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export type ServiceCreate$Outbound = {
|
|
33
|
+
name: string;
|
|
34
|
+
description: string;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const ServiceCreate$outboundSchema: z.ZodType<
|
|
39
|
+
ServiceCreate$Outbound,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
ServiceCreate
|
|
42
|
+
> = z.object({
|
|
43
|
+
name: z.string(),
|
|
44
|
+
description: z.string(),
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @internal
|
|
49
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
50
|
+
*/
|
|
51
|
+
export namespace ServiceCreate$ {
|
|
52
|
+
/** @deprecated use `ServiceCreate$inboundSchema` instead. */
|
|
53
|
+
export const inboundSchema = ServiceCreate$inboundSchema;
|
|
54
|
+
/** @deprecated use `ServiceCreate$outboundSchema` instead. */
|
|
55
|
+
export const outboundSchema = ServiceCreate$outboundSchema;
|
|
56
|
+
/** @deprecated use `ServiceCreate$Outbound` instead. */
|
|
57
|
+
export type Outbound = ServiceCreate$Outbound;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function serviceCreateToJSON(serviceCreate: ServiceCreate): string {
|
|
61
|
+
return JSON.stringify(ServiceCreate$outboundSchema.parse(serviceCreate));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function serviceCreateFromJSON(
|
|
65
|
+
jsonString: string,
|
|
66
|
+
): SafeParseResult<ServiceCreate, SDKValidationError> {
|
|
67
|
+
return safeParse(
|
|
68
|
+
jsonString,
|
|
69
|
+
(x) => ServiceCreate$inboundSchema.parse(JSON.parse(x)),
|
|
70
|
+
`Failed to parse 'ServiceCreate' from JSON`,
|
|
71
|
+
);
|
|
72
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const ServiceProperties = {
|
|
9
|
+
Id: "id",
|
|
10
|
+
Name: "name",
|
|
11
|
+
} as const;
|
|
12
|
+
export type ServiceProperties = ClosedEnum<typeof ServiceProperties>;
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const ServiceProperties$inboundSchema: z.ZodNativeEnum<
|
|
16
|
+
typeof ServiceProperties
|
|
17
|
+
> = z.nativeEnum(ServiceProperties);
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const ServiceProperties$outboundSchema: z.ZodNativeEnum<
|
|
21
|
+
typeof ServiceProperties
|
|
22
|
+
> = ServiceProperties$inboundSchema;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @internal
|
|
26
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
27
|
+
*/
|
|
28
|
+
export namespace ServiceProperties$ {
|
|
29
|
+
/** @deprecated use `ServiceProperties$inboundSchema` instead. */
|
|
30
|
+
export const inboundSchema = ServiceProperties$inboundSchema;
|
|
31
|
+
/** @deprecated use `ServiceProperties$outboundSchema` instead. */
|
|
32
|
+
export const outboundSchema = ServiceProperties$outboundSchema;
|
|
33
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type ServiceUpdate = {
|
|
11
|
+
/**
|
|
12
|
+
* The name of the service
|
|
13
|
+
*/
|
|
14
|
+
name: string;
|
|
15
|
+
/**
|
|
16
|
+
* The description of the service
|
|
17
|
+
*/
|
|
18
|
+
description: string;
|
|
19
|
+
/**
|
|
20
|
+
* The ID of the service
|
|
21
|
+
*/
|
|
22
|
+
id: number;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const ServiceUpdate$inboundSchema: z.ZodType<
|
|
27
|
+
ServiceUpdate,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
unknown
|
|
30
|
+
> = z.object({
|
|
31
|
+
name: z.string(),
|
|
32
|
+
description: z.string(),
|
|
33
|
+
id: z.number().int(),
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export type ServiceUpdate$Outbound = {
|
|
38
|
+
name: string;
|
|
39
|
+
description: string;
|
|
40
|
+
id: number;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export const ServiceUpdate$outboundSchema: z.ZodType<
|
|
45
|
+
ServiceUpdate$Outbound,
|
|
46
|
+
z.ZodTypeDef,
|
|
47
|
+
ServiceUpdate
|
|
48
|
+
> = z.object({
|
|
49
|
+
name: z.string(),
|
|
50
|
+
description: z.string(),
|
|
51
|
+
id: z.number().int(),
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @internal
|
|
56
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
57
|
+
*/
|
|
58
|
+
export namespace ServiceUpdate$ {
|
|
59
|
+
/** @deprecated use `ServiceUpdate$inboundSchema` instead. */
|
|
60
|
+
export const inboundSchema = ServiceUpdate$inboundSchema;
|
|
61
|
+
/** @deprecated use `ServiceUpdate$outboundSchema` instead. */
|
|
62
|
+
export const outboundSchema = ServiceUpdate$outboundSchema;
|
|
63
|
+
/** @deprecated use `ServiceUpdate$Outbound` instead. */
|
|
64
|
+
export type Outbound = ServiceUpdate$Outbound;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function serviceUpdateToJSON(serviceUpdate: ServiceUpdate): string {
|
|
68
|
+
return JSON.stringify(ServiceUpdate$outboundSchema.parse(serviceUpdate));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function serviceUpdateFromJSON(
|
|
72
|
+
jsonString: string,
|
|
73
|
+
): SafeParseResult<ServiceUpdate, SDKValidationError> {
|
|
74
|
+
return safeParse(
|
|
75
|
+
jsonString,
|
|
76
|
+
(x) => ServiceUpdate$inboundSchema.parse(JSON.parse(x)),
|
|
77
|
+
`Failed to parse 'ServiceUpdate' from JSON`,
|
|
78
|
+
);
|
|
79
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The definition of the tool
|
|
13
|
+
*/
|
|
14
|
+
export type ToolCreateDefinition = {};
|
|
15
|
+
|
|
16
|
+
export type ToolCreate = {
|
|
17
|
+
/**
|
|
18
|
+
* The name of the tool
|
|
19
|
+
*/
|
|
20
|
+
name: string;
|
|
21
|
+
/**
|
|
22
|
+
* The definition of the tool
|
|
23
|
+
*/
|
|
24
|
+
definition?: ToolCreateDefinition | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* The service this tool belongs to
|
|
27
|
+
*/
|
|
28
|
+
serviceId: number;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const ToolCreateDefinition$inboundSchema: z.ZodType<
|
|
33
|
+
ToolCreateDefinition,
|
|
34
|
+
z.ZodTypeDef,
|
|
35
|
+
unknown
|
|
36
|
+
> = z.object({});
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type ToolCreateDefinition$Outbound = {};
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const ToolCreateDefinition$outboundSchema: z.ZodType<
|
|
43
|
+
ToolCreateDefinition$Outbound,
|
|
44
|
+
z.ZodTypeDef,
|
|
45
|
+
ToolCreateDefinition
|
|
46
|
+
> = z.object({});
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @internal
|
|
50
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
51
|
+
*/
|
|
52
|
+
export namespace ToolCreateDefinition$ {
|
|
53
|
+
/** @deprecated use `ToolCreateDefinition$inboundSchema` instead. */
|
|
54
|
+
export const inboundSchema = ToolCreateDefinition$inboundSchema;
|
|
55
|
+
/** @deprecated use `ToolCreateDefinition$outboundSchema` instead. */
|
|
56
|
+
export const outboundSchema = ToolCreateDefinition$outboundSchema;
|
|
57
|
+
/** @deprecated use `ToolCreateDefinition$Outbound` instead. */
|
|
58
|
+
export type Outbound = ToolCreateDefinition$Outbound;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function toolCreateDefinitionToJSON(
|
|
62
|
+
toolCreateDefinition: ToolCreateDefinition,
|
|
63
|
+
): string {
|
|
64
|
+
return JSON.stringify(
|
|
65
|
+
ToolCreateDefinition$outboundSchema.parse(toolCreateDefinition),
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function toolCreateDefinitionFromJSON(
|
|
70
|
+
jsonString: string,
|
|
71
|
+
): SafeParseResult<ToolCreateDefinition, SDKValidationError> {
|
|
72
|
+
return safeParse(
|
|
73
|
+
jsonString,
|
|
74
|
+
(x) => ToolCreateDefinition$inboundSchema.parse(JSON.parse(x)),
|
|
75
|
+
`Failed to parse 'ToolCreateDefinition' from JSON`,
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** @internal */
|
|
80
|
+
export const ToolCreate$inboundSchema: z.ZodType<
|
|
81
|
+
ToolCreate,
|
|
82
|
+
z.ZodTypeDef,
|
|
83
|
+
unknown
|
|
84
|
+
> = z.object({
|
|
85
|
+
name: z.string(),
|
|
86
|
+
definition: z.lazy(() => ToolCreateDefinition$inboundSchema).optional(),
|
|
87
|
+
service_id: z.number().int(),
|
|
88
|
+
}).transform((v) => {
|
|
89
|
+
return remap$(v, {
|
|
90
|
+
"service_id": "serviceId",
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
/** @internal */
|
|
95
|
+
export type ToolCreate$Outbound = {
|
|
96
|
+
name: string;
|
|
97
|
+
definition?: ToolCreateDefinition$Outbound | undefined;
|
|
98
|
+
service_id: number;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
/** @internal */
|
|
102
|
+
export const ToolCreate$outboundSchema: z.ZodType<
|
|
103
|
+
ToolCreate$Outbound,
|
|
104
|
+
z.ZodTypeDef,
|
|
105
|
+
ToolCreate
|
|
106
|
+
> = z.object({
|
|
107
|
+
name: z.string(),
|
|
108
|
+
definition: z.lazy(() => ToolCreateDefinition$outboundSchema).optional(),
|
|
109
|
+
serviceId: z.number().int(),
|
|
110
|
+
}).transform((v) => {
|
|
111
|
+
return remap$(v, {
|
|
112
|
+
serviceId: "service_id",
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @internal
|
|
118
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
119
|
+
*/
|
|
120
|
+
export namespace ToolCreate$ {
|
|
121
|
+
/** @deprecated use `ToolCreate$inboundSchema` instead. */
|
|
122
|
+
export const inboundSchema = ToolCreate$inboundSchema;
|
|
123
|
+
/** @deprecated use `ToolCreate$outboundSchema` instead. */
|
|
124
|
+
export const outboundSchema = ToolCreate$outboundSchema;
|
|
125
|
+
/** @deprecated use `ToolCreate$Outbound` instead. */
|
|
126
|
+
export type Outbound = ToolCreate$Outbound;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export function toolCreateToJSON(toolCreate: ToolCreate): string {
|
|
130
|
+
return JSON.stringify(ToolCreate$outboundSchema.parse(toolCreate));
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export function toolCreateFromJSON(
|
|
134
|
+
jsonString: string,
|
|
135
|
+
): SafeParseResult<ToolCreate, SDKValidationError> {
|
|
136
|
+
return safeParse(
|
|
137
|
+
jsonString,
|
|
138
|
+
(x) => ToolCreate$inboundSchema.parse(JSON.parse(x)),
|
|
139
|
+
`Failed to parse 'ToolCreate' from JSON`,
|
|
140
|
+
);
|
|
141
|
+
}
|