syllable-sdk 0.1.0-alpha.13 → 0.1.0-alpha.15
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 +5 -1
- package/docs/sdks/agents/README.md +73 -1
- package/docs/sdks/v1/README.md +72 -0
- package/funcs/agentsAgentGetAvailableVoices.d.ts +15 -0
- package/funcs/agentsAgentGetAvailableVoices.d.ts.map +1 -0
- package/funcs/agentsAgentGetAvailableVoices.js +86 -0
- package/funcs/agentsAgentGetAvailableVoices.js.map +1 -0
- package/funcs/v1AgentGetAvailableVoices.d.ts +15 -0
- package/funcs/v1AgentGetAvailableVoices.d.ts.map +1 -0
- package/funcs/v1AgentGetAvailableVoices.js +86 -0
- package/funcs/v1AgentGetAvailableVoices.js.map +1 -0
- package/hooks/hooks.d.ts.map +1 -1
- package/hooks/hooks.js +18 -0
- package/hooks/hooks.js.map +1 -1
- package/hooks/types.d.ts +1 -0
- package/hooks/types.d.ts.map +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/models/components/agent.d.ts +6 -23
- package/models/components/agent.d.ts.map +1 -1
- package/models/components/agent.js +3 -26
- package/models/components/agent.js.map +1 -1
- package/models/components/agentcreate.d.ts +6 -23
- package/models/components/agentcreate.d.ts.map +1 -1
- package/models/components/agentcreate.js +3 -28
- package/models/components/agentcreate.js.map +1 -1
- package/models/components/agentupdate.d.ts +6 -23
- package/models/components/agentupdate.d.ts.map +1 -1
- package/models/components/agentupdate.js +3 -28
- package/models/components/agentupdate.js.map +1 -1
- package/models/components/agentvoice.d.ts +35 -0
- package/models/components/agentvoice.d.ts.map +1 -0
- package/models/components/agentvoice.js +76 -0
- package/models/components/agentvoice.js.map +1 -0
- package/models/components/agentvoicevarname.d.ts +106 -0
- package/models/components/agentvoicevarname.d.ts.map +1 -0
- package/models/components/agentvoicevarname.js +76 -0
- package/models/components/agentvoicevarname.js.map +1 -0
- package/models/components/index.d.ts +3 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +3 -0
- package/models/components/index.js.map +1 -1
- package/models/components/sttprovider.d.ts +31 -0
- package/models/components/sttprovider.d.ts.map +1 -0
- package/models/components/sttprovider.js +52 -0
- package/models/components/sttprovider.js.map +1 -0
- package/package.json +1 -3
- package/sdk/agents.d.ts +7 -0
- package/sdk/agents.d.ts.map +1 -1
- package/sdk/agents.js +10 -0
- package/sdk/agents.js.map +1 -1
- package/sdk/sdk.d.ts +2 -2
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -4
- package/sdk/sdk.js.map +1 -1
- package/sdk/v1.d.ts +7 -0
- package/sdk/v1.d.ts.map +1 -1
- package/sdk/v1.js +10 -0
- package/sdk/v1.js.map +1 -1
- package/src/funcs/agentsAgentGetAvailableVoices.ts +108 -0
- package/src/funcs/v1AgentGetAvailableVoices.ts +108 -0
- package/src/hooks/hooks.ts +20 -0
- package/src/hooks/types.ts +7 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/agent.ts +4 -50
- package/src/models/components/agentcreate.ts +4 -56
- package/src/models/components/agentupdate.ts +4 -56
- package/src/models/components/agentvoice.ts +91 -0
- package/src/models/components/agentvoicevarname.ts +59 -0
- package/src/models/components/index.ts +3 -0
- package/src/models/components/sttprovider.ts +32 -0
- package/src/sdk/agents.ts +16 -0
- package/src/sdk/sdk.ts +5 -5
- package/src/sdk/v1.ts +16 -0
package/src/hooks/hooks.ts
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
BeforeCreateRequestHook,
|
|
13
13
|
BeforeRequestContext,
|
|
14
14
|
BeforeRequestHook,
|
|
15
|
+
Hook,
|
|
15
16
|
Hooks,
|
|
16
17
|
SDKInitHook,
|
|
17
18
|
SDKInitOptions,
|
|
@@ -25,6 +26,25 @@ export class SDKHooks implements Hooks {
|
|
|
25
26
|
afterErrorHooks: AfterErrorHook[] = [];
|
|
26
27
|
|
|
27
28
|
constructor() {
|
|
29
|
+
const presetHooks: Array<Hook> = [];
|
|
30
|
+
|
|
31
|
+
for (const hook of presetHooks) {
|
|
32
|
+
if ("sdkInit" in hook) {
|
|
33
|
+
this.registerSDKInitHook(hook);
|
|
34
|
+
}
|
|
35
|
+
if ("beforeCreateRequest" in hook) {
|
|
36
|
+
this.registerBeforeCreateRequestHook(hook);
|
|
37
|
+
}
|
|
38
|
+
if ("beforeRequest" in hook) {
|
|
39
|
+
this.registerBeforeRequestHook(hook);
|
|
40
|
+
}
|
|
41
|
+
if ("afterSuccess" in hook) {
|
|
42
|
+
this.registerAfterSuccessHook(hook);
|
|
43
|
+
}
|
|
44
|
+
if ("afterError" in hook) {
|
|
45
|
+
this.registerAfterErrorHook(hook);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
28
48
|
}
|
|
29
49
|
|
|
30
50
|
registerSDKInitHook(hook: SDKInitHook) {
|
package/src/hooks/types.ts
CHANGED
|
@@ -100,3 +100,10 @@ export interface Hooks {
|
|
|
100
100
|
/** Registers a hook to be used by the SDK for the after error event. */
|
|
101
101
|
registerAfterErrorHook(hook: AfterErrorHook): void;
|
|
102
102
|
}
|
|
103
|
+
|
|
104
|
+
export type Hook =
|
|
105
|
+
| SDKInitHook
|
|
106
|
+
| BeforeCreateRequestHook
|
|
107
|
+
| BeforeRequestHook
|
|
108
|
+
| AfterSuccessHook
|
|
109
|
+
| AfterErrorHook;
|
package/src/lib/config.ts
CHANGED
|
@@ -61,8 +61,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
61
61
|
export const SDK_METADATA = {
|
|
62
62
|
language: "typescript",
|
|
63
63
|
openapiDocVersion: "0.0.2",
|
|
64
|
-
sdkVersion: "0.1.0-alpha.
|
|
65
|
-
genVersion: "2.
|
|
64
|
+
sdkVersion: "0.1.0-alpha.15",
|
|
65
|
+
genVersion: "2.474.15",
|
|
66
66
|
userAgent:
|
|
67
|
-
"speakeasy-sdk/typescript 0.1.0-alpha.
|
|
67
|
+
"speakeasy-sdk/typescript 0.1.0-alpha.15 2.474.15 0.0.2 syllable-sdk",
|
|
68
68
|
} as const;
|
|
@@ -20,8 +20,6 @@ import {
|
|
|
20
20
|
Target$outboundSchema,
|
|
21
21
|
} from "./target.js";
|
|
22
22
|
|
|
23
|
-
export type Variables = {};
|
|
24
|
-
|
|
25
23
|
export type Agent = {
|
|
26
24
|
name: string;
|
|
27
25
|
description?: string | null | undefined;
|
|
@@ -33,7 +31,7 @@ export type Agent = {
|
|
|
33
31
|
languages: Array<string>;
|
|
34
32
|
promptToolDefaults?: Array<AgentToolDefaults> | undefined;
|
|
35
33
|
toolHeaders?: { [k: string]: string } | null | undefined;
|
|
36
|
-
variables?:
|
|
34
|
+
variables?: { [k: string]: string } | null | undefined;
|
|
37
35
|
/**
|
|
38
36
|
* The Agent ID
|
|
39
37
|
*/
|
|
@@ -43,50 +41,6 @@ export type Agent = {
|
|
|
43
41
|
lastUpdatedBy?: string | null | undefined;
|
|
44
42
|
};
|
|
45
43
|
|
|
46
|
-
/** @internal */
|
|
47
|
-
export const Variables$inboundSchema: z.ZodType<
|
|
48
|
-
Variables,
|
|
49
|
-
z.ZodTypeDef,
|
|
50
|
-
unknown
|
|
51
|
-
> = z.object({});
|
|
52
|
-
|
|
53
|
-
/** @internal */
|
|
54
|
-
export type Variables$Outbound = {};
|
|
55
|
-
|
|
56
|
-
/** @internal */
|
|
57
|
-
export const Variables$outboundSchema: z.ZodType<
|
|
58
|
-
Variables$Outbound,
|
|
59
|
-
z.ZodTypeDef,
|
|
60
|
-
Variables
|
|
61
|
-
> = z.object({});
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* @internal
|
|
65
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
66
|
-
*/
|
|
67
|
-
export namespace Variables$ {
|
|
68
|
-
/** @deprecated use `Variables$inboundSchema` instead. */
|
|
69
|
-
export const inboundSchema = Variables$inboundSchema;
|
|
70
|
-
/** @deprecated use `Variables$outboundSchema` instead. */
|
|
71
|
-
export const outboundSchema = Variables$outboundSchema;
|
|
72
|
-
/** @deprecated use `Variables$Outbound` instead. */
|
|
73
|
-
export type Outbound = Variables$Outbound;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export function variablesToJSON(variables: Variables): string {
|
|
77
|
-
return JSON.stringify(Variables$outboundSchema.parse(variables));
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export function variablesFromJSON(
|
|
81
|
-
jsonString: string,
|
|
82
|
-
): SafeParseResult<Variables, SDKValidationError> {
|
|
83
|
-
return safeParse(
|
|
84
|
-
jsonString,
|
|
85
|
-
(x) => Variables$inboundSchema.parse(JSON.parse(x)),
|
|
86
|
-
`Failed to parse 'Variables' from JSON`,
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
44
|
/** @internal */
|
|
91
45
|
export const Agent$inboundSchema: z.ZodType<Agent, z.ZodTypeDef, unknown> = z
|
|
92
46
|
.object({
|
|
@@ -100,7 +54,7 @@ export const Agent$inboundSchema: z.ZodType<Agent, z.ZodTypeDef, unknown> = z
|
|
|
100
54
|
languages: z.array(z.string()),
|
|
101
55
|
prompt_tool_defaults: z.array(AgentToolDefaults$inboundSchema).optional(),
|
|
102
56
|
tool_headers: z.nullable(z.record(z.string())).optional(),
|
|
103
|
-
variables: z.nullable(z.
|
|
57
|
+
variables: z.nullable(z.record(z.string())).optional(),
|
|
104
58
|
id: z.number().int(),
|
|
105
59
|
updated_at: z.nullable(
|
|
106
60
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
@@ -131,7 +85,7 @@ export type Agent$Outbound = {
|
|
|
131
85
|
languages: Array<string>;
|
|
132
86
|
prompt_tool_defaults?: Array<AgentToolDefaults$Outbound> | undefined;
|
|
133
87
|
tool_headers?: { [k: string]: string } | null | undefined;
|
|
134
|
-
variables?:
|
|
88
|
+
variables?: { [k: string]: string } | null | undefined;
|
|
135
89
|
id: number;
|
|
136
90
|
updated_at?: string | null | undefined;
|
|
137
91
|
channel_targets?: Array<Target$Outbound> | null | undefined;
|
|
@@ -154,7 +108,7 @@ export const Agent$outboundSchema: z.ZodType<
|
|
|
154
108
|
languages: z.array(z.string()),
|
|
155
109
|
promptToolDefaults: z.array(AgentToolDefaults$outboundSchema).optional(),
|
|
156
110
|
toolHeaders: z.nullable(z.record(z.string())).optional(),
|
|
157
|
-
variables: z.nullable(z.
|
|
111
|
+
variables: z.nullable(z.record(z.string())).optional(),
|
|
158
112
|
id: z.number().int(),
|
|
159
113
|
updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
160
114
|
channelTargets: z.nullable(z.array(Target$outboundSchema)).optional(),
|
|
@@ -14,8 +14,6 @@ import {
|
|
|
14
14
|
AgentToolDefaults$outboundSchema,
|
|
15
15
|
} from "./agenttooldefaults.js";
|
|
16
16
|
|
|
17
|
-
export type AgentCreateVariables = {};
|
|
18
|
-
|
|
19
17
|
export type AgentCreate = {
|
|
20
18
|
name: string;
|
|
21
19
|
description?: string | null | undefined;
|
|
@@ -27,57 +25,9 @@ export type AgentCreate = {
|
|
|
27
25
|
languages: Array<string>;
|
|
28
26
|
promptToolDefaults?: Array<AgentToolDefaults> | undefined;
|
|
29
27
|
toolHeaders?: { [k: string]: string } | null | undefined;
|
|
30
|
-
variables?:
|
|
28
|
+
variables?: { [k: string]: string } | null | undefined;
|
|
31
29
|
};
|
|
32
30
|
|
|
33
|
-
/** @internal */
|
|
34
|
-
export const AgentCreateVariables$inboundSchema: z.ZodType<
|
|
35
|
-
AgentCreateVariables,
|
|
36
|
-
z.ZodTypeDef,
|
|
37
|
-
unknown
|
|
38
|
-
> = z.object({});
|
|
39
|
-
|
|
40
|
-
/** @internal */
|
|
41
|
-
export type AgentCreateVariables$Outbound = {};
|
|
42
|
-
|
|
43
|
-
/** @internal */
|
|
44
|
-
export const AgentCreateVariables$outboundSchema: z.ZodType<
|
|
45
|
-
AgentCreateVariables$Outbound,
|
|
46
|
-
z.ZodTypeDef,
|
|
47
|
-
AgentCreateVariables
|
|
48
|
-
> = z.object({});
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* @internal
|
|
52
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
53
|
-
*/
|
|
54
|
-
export namespace AgentCreateVariables$ {
|
|
55
|
-
/** @deprecated use `AgentCreateVariables$inboundSchema` instead. */
|
|
56
|
-
export const inboundSchema = AgentCreateVariables$inboundSchema;
|
|
57
|
-
/** @deprecated use `AgentCreateVariables$outboundSchema` instead. */
|
|
58
|
-
export const outboundSchema = AgentCreateVariables$outboundSchema;
|
|
59
|
-
/** @deprecated use `AgentCreateVariables$Outbound` instead. */
|
|
60
|
-
export type Outbound = AgentCreateVariables$Outbound;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export function agentCreateVariablesToJSON(
|
|
64
|
-
agentCreateVariables: AgentCreateVariables,
|
|
65
|
-
): string {
|
|
66
|
-
return JSON.stringify(
|
|
67
|
-
AgentCreateVariables$outboundSchema.parse(agentCreateVariables),
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export function agentCreateVariablesFromJSON(
|
|
72
|
-
jsonString: string,
|
|
73
|
-
): SafeParseResult<AgentCreateVariables, SDKValidationError> {
|
|
74
|
-
return safeParse(
|
|
75
|
-
jsonString,
|
|
76
|
-
(x) => AgentCreateVariables$inboundSchema.parse(JSON.parse(x)),
|
|
77
|
-
`Failed to parse 'AgentCreateVariables' from JSON`,
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
31
|
/** @internal */
|
|
82
32
|
export const AgentCreate$inboundSchema: z.ZodType<
|
|
83
33
|
AgentCreate,
|
|
@@ -94,8 +44,7 @@ export const AgentCreate$inboundSchema: z.ZodType<
|
|
|
94
44
|
languages: z.array(z.string()),
|
|
95
45
|
prompt_tool_defaults: z.array(AgentToolDefaults$inboundSchema).optional(),
|
|
96
46
|
tool_headers: z.nullable(z.record(z.string())).optional(),
|
|
97
|
-
variables: z.nullable(z.
|
|
98
|
-
.optional(),
|
|
47
|
+
variables: z.nullable(z.record(z.string())).optional(),
|
|
99
48
|
}).transform((v) => {
|
|
100
49
|
return remap$(v, {
|
|
101
50
|
"prompt_id": "promptId",
|
|
@@ -117,7 +66,7 @@ export type AgentCreate$Outbound = {
|
|
|
117
66
|
languages: Array<string>;
|
|
118
67
|
prompt_tool_defaults?: Array<AgentToolDefaults$Outbound> | undefined;
|
|
119
68
|
tool_headers?: { [k: string]: string } | null | undefined;
|
|
120
|
-
variables?:
|
|
69
|
+
variables?: { [k: string]: string } | null | undefined;
|
|
121
70
|
};
|
|
122
71
|
|
|
123
72
|
/** @internal */
|
|
@@ -136,8 +85,7 @@ export const AgentCreate$outboundSchema: z.ZodType<
|
|
|
136
85
|
languages: z.array(z.string()),
|
|
137
86
|
promptToolDefaults: z.array(AgentToolDefaults$outboundSchema).optional(),
|
|
138
87
|
toolHeaders: z.nullable(z.record(z.string())).optional(),
|
|
139
|
-
variables: z.nullable(z.
|
|
140
|
-
.optional(),
|
|
88
|
+
variables: z.nullable(z.record(z.string())).optional(),
|
|
141
89
|
}).transform((v) => {
|
|
142
90
|
return remap$(v, {
|
|
143
91
|
promptId: "prompt_id",
|
|
@@ -14,8 +14,6 @@ import {
|
|
|
14
14
|
AgentToolDefaults$outboundSchema,
|
|
15
15
|
} from "./agenttooldefaults.js";
|
|
16
16
|
|
|
17
|
-
export type AgentUpdateVariables = {};
|
|
18
|
-
|
|
19
17
|
export type AgentUpdate = {
|
|
20
18
|
name: string;
|
|
21
19
|
description?: string | null | undefined;
|
|
@@ -27,61 +25,13 @@ export type AgentUpdate = {
|
|
|
27
25
|
languages: Array<string>;
|
|
28
26
|
promptToolDefaults?: Array<AgentToolDefaults> | undefined;
|
|
29
27
|
toolHeaders?: { [k: string]: string } | null | undefined;
|
|
30
|
-
variables?:
|
|
28
|
+
variables?: { [k: string]: string } | null | undefined;
|
|
31
29
|
/**
|
|
32
30
|
* The Agent ID
|
|
33
31
|
*/
|
|
34
32
|
id: number;
|
|
35
33
|
};
|
|
36
34
|
|
|
37
|
-
/** @internal */
|
|
38
|
-
export const AgentUpdateVariables$inboundSchema: z.ZodType<
|
|
39
|
-
AgentUpdateVariables,
|
|
40
|
-
z.ZodTypeDef,
|
|
41
|
-
unknown
|
|
42
|
-
> = z.object({});
|
|
43
|
-
|
|
44
|
-
/** @internal */
|
|
45
|
-
export type AgentUpdateVariables$Outbound = {};
|
|
46
|
-
|
|
47
|
-
/** @internal */
|
|
48
|
-
export const AgentUpdateVariables$outboundSchema: z.ZodType<
|
|
49
|
-
AgentUpdateVariables$Outbound,
|
|
50
|
-
z.ZodTypeDef,
|
|
51
|
-
AgentUpdateVariables
|
|
52
|
-
> = z.object({});
|
|
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 AgentUpdateVariables$ {
|
|
59
|
-
/** @deprecated use `AgentUpdateVariables$inboundSchema` instead. */
|
|
60
|
-
export const inboundSchema = AgentUpdateVariables$inboundSchema;
|
|
61
|
-
/** @deprecated use `AgentUpdateVariables$outboundSchema` instead. */
|
|
62
|
-
export const outboundSchema = AgentUpdateVariables$outboundSchema;
|
|
63
|
-
/** @deprecated use `AgentUpdateVariables$Outbound` instead. */
|
|
64
|
-
export type Outbound = AgentUpdateVariables$Outbound;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export function agentUpdateVariablesToJSON(
|
|
68
|
-
agentUpdateVariables: AgentUpdateVariables,
|
|
69
|
-
): string {
|
|
70
|
-
return JSON.stringify(
|
|
71
|
-
AgentUpdateVariables$outboundSchema.parse(agentUpdateVariables),
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export function agentUpdateVariablesFromJSON(
|
|
76
|
-
jsonString: string,
|
|
77
|
-
): SafeParseResult<AgentUpdateVariables, SDKValidationError> {
|
|
78
|
-
return safeParse(
|
|
79
|
-
jsonString,
|
|
80
|
-
(x) => AgentUpdateVariables$inboundSchema.parse(JSON.parse(x)),
|
|
81
|
-
`Failed to parse 'AgentUpdateVariables' from JSON`,
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
35
|
/** @internal */
|
|
86
36
|
export const AgentUpdate$inboundSchema: z.ZodType<
|
|
87
37
|
AgentUpdate,
|
|
@@ -98,8 +48,7 @@ export const AgentUpdate$inboundSchema: z.ZodType<
|
|
|
98
48
|
languages: z.array(z.string()),
|
|
99
49
|
prompt_tool_defaults: z.array(AgentToolDefaults$inboundSchema).optional(),
|
|
100
50
|
tool_headers: z.nullable(z.record(z.string())).optional(),
|
|
101
|
-
variables: z.nullable(z.
|
|
102
|
-
.optional(),
|
|
51
|
+
variables: z.nullable(z.record(z.string())).optional(),
|
|
103
52
|
id: z.number().int(),
|
|
104
53
|
}).transform((v) => {
|
|
105
54
|
return remap$(v, {
|
|
@@ -122,7 +71,7 @@ export type AgentUpdate$Outbound = {
|
|
|
122
71
|
languages: Array<string>;
|
|
123
72
|
prompt_tool_defaults?: Array<AgentToolDefaults$Outbound> | undefined;
|
|
124
73
|
tool_headers?: { [k: string]: string } | null | undefined;
|
|
125
|
-
variables?:
|
|
74
|
+
variables?: { [k: string]: string } | null | undefined;
|
|
126
75
|
id: number;
|
|
127
76
|
};
|
|
128
77
|
|
|
@@ -142,8 +91,7 @@ export const AgentUpdate$outboundSchema: z.ZodType<
|
|
|
142
91
|
languages: z.array(z.string()),
|
|
143
92
|
promptToolDefaults: z.array(AgentToolDefaults$outboundSchema).optional(),
|
|
144
93
|
toolHeaders: z.nullable(z.record(z.string())).optional(),
|
|
145
|
-
variables: z.nullable(z.
|
|
146
|
-
.optional(),
|
|
94
|
+
variables: z.nullable(z.record(z.string())).optional(),
|
|
147
95
|
id: z.number().int(),
|
|
148
96
|
}).transform((v) => {
|
|
149
97
|
return remap$(v, {
|
|
@@ -0,0 +1,91 @@
|
|
|
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
|
+
import {
|
|
11
|
+
AgentVoiceVarName,
|
|
12
|
+
AgentVoiceVarName$inboundSchema,
|
|
13
|
+
AgentVoiceVarName$outboundSchema,
|
|
14
|
+
} from "./agentvoicevarname.js";
|
|
15
|
+
import {
|
|
16
|
+
SttProvider,
|
|
17
|
+
SttProvider$inboundSchema,
|
|
18
|
+
SttProvider$outboundSchema,
|
|
19
|
+
} from "./sttprovider.js";
|
|
20
|
+
|
|
21
|
+
export type AgentVoice = {
|
|
22
|
+
provider: SttProvider;
|
|
23
|
+
displayName: string;
|
|
24
|
+
varName: AgentVoiceVarName;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const AgentVoice$inboundSchema: z.ZodType<
|
|
29
|
+
AgentVoice,
|
|
30
|
+
z.ZodTypeDef,
|
|
31
|
+
unknown
|
|
32
|
+
> = z.object({
|
|
33
|
+
provider: SttProvider$inboundSchema,
|
|
34
|
+
display_name: z.string(),
|
|
35
|
+
var_name: AgentVoiceVarName$inboundSchema,
|
|
36
|
+
}).transform((v) => {
|
|
37
|
+
return remap$(v, {
|
|
38
|
+
"display_name": "displayName",
|
|
39
|
+
"var_name": "varName",
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export type AgentVoice$Outbound = {
|
|
45
|
+
provider: string;
|
|
46
|
+
display_name: string;
|
|
47
|
+
var_name: string;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/** @internal */
|
|
51
|
+
export const AgentVoice$outboundSchema: z.ZodType<
|
|
52
|
+
AgentVoice$Outbound,
|
|
53
|
+
z.ZodTypeDef,
|
|
54
|
+
AgentVoice
|
|
55
|
+
> = z.object({
|
|
56
|
+
provider: SttProvider$outboundSchema,
|
|
57
|
+
displayName: z.string(),
|
|
58
|
+
varName: AgentVoiceVarName$outboundSchema,
|
|
59
|
+
}).transform((v) => {
|
|
60
|
+
return remap$(v, {
|
|
61
|
+
displayName: "display_name",
|
|
62
|
+
varName: "var_name",
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @internal
|
|
68
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
69
|
+
*/
|
|
70
|
+
export namespace AgentVoice$ {
|
|
71
|
+
/** @deprecated use `AgentVoice$inboundSchema` instead. */
|
|
72
|
+
export const inboundSchema = AgentVoice$inboundSchema;
|
|
73
|
+
/** @deprecated use `AgentVoice$outboundSchema` instead. */
|
|
74
|
+
export const outboundSchema = AgentVoice$outboundSchema;
|
|
75
|
+
/** @deprecated use `AgentVoice$Outbound` instead. */
|
|
76
|
+
export type Outbound = AgentVoice$Outbound;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function agentVoiceToJSON(agentVoice: AgentVoice): string {
|
|
80
|
+
return JSON.stringify(AgentVoice$outboundSchema.parse(agentVoice));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function agentVoiceFromJSON(
|
|
84
|
+
jsonString: string,
|
|
85
|
+
): SafeParseResult<AgentVoice, SDKValidationError> {
|
|
86
|
+
return safeParse(
|
|
87
|
+
jsonString,
|
|
88
|
+
(x) => AgentVoice$inboundSchema.parse(JSON.parse(x)),
|
|
89
|
+
`Failed to parse 'AgentVoice' from JSON`,
|
|
90
|
+
);
|
|
91
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
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 AgentVoiceVarName = {
|
|
9
|
+
OpenaiAlloy: "openai:alloy",
|
|
10
|
+
OpenaiEcho: "openai:echo",
|
|
11
|
+
OpenaiFable: "openai:fable",
|
|
12
|
+
OpenaiNova: "openai:nova",
|
|
13
|
+
OpenaiOnyx: "openai:onyx",
|
|
14
|
+
OpenaiShimmer: "openai:shimmer",
|
|
15
|
+
ElevenlabsAlice: "elevenlabs:Alice",
|
|
16
|
+
ElevenlabsBill: "elevenlabs:Bill",
|
|
17
|
+
ElevenlabsBrian: "elevenlabs:Brian",
|
|
18
|
+
ElevenlabsCallum: "elevenlabs:Callum",
|
|
19
|
+
ElevenlabsCharlie: "elevenlabs:Charlie",
|
|
20
|
+
ElevenlabsCharlotte: "elevenlabs:Charlotte",
|
|
21
|
+
ElevenlabsChris: "elevenlabs:Chris",
|
|
22
|
+
ElevenlabsDaniel: "elevenlabs:Daniel",
|
|
23
|
+
ElevenlabsEric: "elevenlabs:Eric",
|
|
24
|
+
ElevenlabsGeorge: "elevenlabs:George",
|
|
25
|
+
ElevenlabsJessica: "elevenlabs:Jessica",
|
|
26
|
+
ElevenlabsLaura: "elevenlabs:Laura",
|
|
27
|
+
ElevenlabsLiam: "elevenlabs:Liam",
|
|
28
|
+
ElevenlabsLily: "elevenlabs:Lily",
|
|
29
|
+
ElevenlabsMatilda: "elevenlabs:Matilda",
|
|
30
|
+
ElevenlabsRiver: "elevenlabs:River",
|
|
31
|
+
ElevenlabsRoger: "elevenlabs:Roger",
|
|
32
|
+
ElevenlabsSarah: "elevenlabs:Sarah",
|
|
33
|
+
ElevenlabsWill: "elevenlabs:Will",
|
|
34
|
+
WavenetFemaleEnUSNeural2F: "wavenet:female/en-US-Neural2-F",
|
|
35
|
+
WavenetMaleEnUSNeural2D: "wavenet:male/en-US-Neural2-D",
|
|
36
|
+
WavenetFemaleEnUSStudioO: "wavenet:female/en-US-Studio-O",
|
|
37
|
+
} as const;
|
|
38
|
+
export type AgentVoiceVarName = ClosedEnum<typeof AgentVoiceVarName>;
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const AgentVoiceVarName$inboundSchema: z.ZodNativeEnum<
|
|
42
|
+
typeof AgentVoiceVarName
|
|
43
|
+
> = z.nativeEnum(AgentVoiceVarName);
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const AgentVoiceVarName$outboundSchema: z.ZodNativeEnum<
|
|
47
|
+
typeof AgentVoiceVarName
|
|
48
|
+
> = AgentVoiceVarName$inboundSchema;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @internal
|
|
52
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
53
|
+
*/
|
|
54
|
+
export namespace AgentVoiceVarName$ {
|
|
55
|
+
/** @deprecated use `AgentVoiceVarName$inboundSchema` instead. */
|
|
56
|
+
export const inboundSchema = AgentVoiceVarName$inboundSchema;
|
|
57
|
+
/** @deprecated use `AgentVoiceVarName$outboundSchema` instead. */
|
|
58
|
+
export const outboundSchema = AgentVoiceVarName$outboundSchema;
|
|
59
|
+
}
|
|
@@ -8,6 +8,8 @@ export * from "./agentproperties.js";
|
|
|
8
8
|
export * from "./agenttooldefaults.js";
|
|
9
9
|
export * from "./agenttoolfielddefault.js";
|
|
10
10
|
export * from "./agentupdate.js";
|
|
11
|
+
export * from "./agentvoice.js";
|
|
12
|
+
export * from "./agentvoicevarname.js";
|
|
11
13
|
export * from "./availabletarget.js";
|
|
12
14
|
export * from "./availabletargetproperties.js";
|
|
13
15
|
export * from "./bodydirectorymemberbulkload.js";
|
|
@@ -62,6 +64,7 @@ export * from "./sessionproperties.js";
|
|
|
62
64
|
export * from "./sessionrecordingresponse.js";
|
|
63
65
|
export * from "./sessiontext.js";
|
|
64
66
|
export * from "./sessiontranscriptionresponse.js";
|
|
67
|
+
export * from "./sttprovider.js";
|
|
65
68
|
export * from "./target.js";
|
|
66
69
|
export * from "./targetmodes.js";
|
|
67
70
|
export * from "./testmessage.js";
|
|
@@ -0,0 +1,32 @@
|
|
|
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 SttProvider = {
|
|
9
|
+
OpenAI: "OpenAI",
|
|
10
|
+
ElevenLabs: "ElevenLabs",
|
|
11
|
+
Google: "Google",
|
|
12
|
+
} as const;
|
|
13
|
+
export type SttProvider = ClosedEnum<typeof SttProvider>;
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const SttProvider$inboundSchema: z.ZodNativeEnum<typeof SttProvider> = z
|
|
17
|
+
.nativeEnum(SttProvider);
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const SttProvider$outboundSchema: z.ZodNativeEnum<typeof SttProvider> =
|
|
21
|
+
SttProvider$inboundSchema;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @internal
|
|
25
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
26
|
+
*/
|
|
27
|
+
export namespace SttProvider$ {
|
|
28
|
+
/** @deprecated use `SttProvider$inboundSchema` instead. */
|
|
29
|
+
export const inboundSchema = SttProvider$inboundSchema;
|
|
30
|
+
/** @deprecated use `SttProvider$outboundSchema` instead. */
|
|
31
|
+
export const outboundSchema = SttProvider$outboundSchema;
|
|
32
|
+
}
|
package/src/sdk/agents.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import { agentsAgentGetAvailableVoices } from "../funcs/agentsAgentGetAvailableVoices.js";
|
|
5
6
|
import { agentsCreate } from "../funcs/agentsCreate.js";
|
|
6
7
|
import { agentsDelete } from "../funcs/agentsDelete.js";
|
|
7
8
|
import { agentsGetById } from "../funcs/agentsGetById.js";
|
|
@@ -100,4 +101,19 @@ export class Agents extends ClientSDK {
|
|
|
100
101
|
options,
|
|
101
102
|
));
|
|
102
103
|
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Get Available Agent Voices
|
|
107
|
+
*
|
|
108
|
+
* @remarks
|
|
109
|
+
* Get available agent voices.
|
|
110
|
+
*/
|
|
111
|
+
async agentGetAvailableVoices(
|
|
112
|
+
options?: RequestOptions,
|
|
113
|
+
): Promise<Array<components.AgentVoice>> {
|
|
114
|
+
return unwrapAsync(agentsAgentGetAvailableVoices(
|
|
115
|
+
this,
|
|
116
|
+
options,
|
|
117
|
+
));
|
|
118
|
+
}
|
|
103
119
|
}
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -23,6 +23,11 @@ export class SyllableSDK extends ClientSDK {
|
|
|
23
23
|
return (this._agents ??= new Agents(this._options));
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
private _v1?: V1;
|
|
27
|
+
get v1(): V1 {
|
|
28
|
+
return (this._v1 ??= new V1(this._options));
|
|
29
|
+
}
|
|
30
|
+
|
|
26
31
|
private _channels?: Channels;
|
|
27
32
|
get channels(): Channels {
|
|
28
33
|
return (this._channels ??= new Channels(this._options));
|
|
@@ -77,9 +82,4 @@ export class SyllableSDK extends ClientSDK {
|
|
|
77
82
|
get directory(): Directory {
|
|
78
83
|
return (this._directory ??= new Directory(this._options));
|
|
79
84
|
}
|
|
80
|
-
|
|
81
|
-
private _v1?: V1;
|
|
82
|
-
get v1(): V1 {
|
|
83
|
-
return (this._v1 ??= new V1(this._options));
|
|
84
|
-
}
|
|
85
85
|
}
|
package/src/sdk/v1.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import { v1AgentGetAvailableVoices } from "../funcs/v1AgentGetAvailableVoices.js";
|
|
5
6
|
import { v1Create } from "../funcs/v1Create.js";
|
|
6
7
|
import { v1Delete } from "../funcs/v1Delete.js";
|
|
7
8
|
import { v1DirectoryMemberBulkLoad } from "../funcs/v1DirectoryMemberBulkLoad.js";
|
|
@@ -15,6 +16,21 @@ import * as operations from "../models/operations/index.js";
|
|
|
15
16
|
import { unwrapAsync } from "../types/fp.js";
|
|
16
17
|
|
|
17
18
|
export class V1 extends ClientSDK {
|
|
19
|
+
/**
|
|
20
|
+
* Get Available Agent Voices
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* Get available agent voices.
|
|
24
|
+
*/
|
|
25
|
+
async agentGetAvailableVoices(
|
|
26
|
+
options?: RequestOptions,
|
|
27
|
+
): Promise<Array<components.AgentVoice>> {
|
|
28
|
+
return unwrapAsync(v1AgentGetAvailableVoices(
|
|
29
|
+
this,
|
|
30
|
+
options,
|
|
31
|
+
));
|
|
32
|
+
}
|
|
33
|
+
|
|
18
34
|
/**
|
|
19
35
|
* Directory Member List
|
|
20
36
|
*
|