syllable-sdk 0.1.0-alpha.26 → 0.1.0-alpha.28
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 +6 -25
- package/docs/sdks/tools/README.md +36 -0
- package/lib/config.d.ts +3 -3
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +6 -6
- package/lib/config.js.map +1 -1
- package/models/components/channeltarget.d.ts +16 -16
- package/models/components/channeltarget.d.ts.map +1 -1
- package/models/components/channeltarget.js +16 -16
- package/models/components/channeltarget.js.map +1 -1
- package/models/components/channeltargetcreaterequest.d.ts +12 -12
- package/models/components/channeltargetcreaterequest.d.ts.map +1 -1
- package/models/components/channeltargetcreaterequest.js +12 -12
- package/models/components/channeltargetcreaterequest.js.map +1 -1
- package/models/components/channeltargetupdaterequest.d.ts +12 -12
- package/models/components/channeltargetupdaterequest.d.ts.map +1 -1
- package/models/components/channeltargetupdaterequest.js +12 -12
- package/models/components/channeltargetupdaterequest.js.map +1 -1
- package/models/components/function.d.ts +74 -0
- package/models/components/function.d.ts.map +1 -0
- package/models/components/function.js +86 -0
- package/models/components/function.js.map +1 -0
- package/models/components/httpendpoint.d.ts +114 -0
- package/models/components/httpendpoint.d.ts.map +1 -0
- package/models/components/httpendpoint.js +119 -0
- package/models/components/httpendpoint.js.map +1 -0
- package/models/components/index.d.ts +7 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +7 -0
- package/models/components/index.js.map +1 -1
- package/models/components/sdkinternaltool.d.ts +46 -0
- package/models/components/sdkinternaltool.d.ts.map +1 -0
- package/models/components/sdkinternaltool.js +62 -0
- package/models/components/sdkinternaltool.js.map +1 -0
- package/models/components/sdktooldefinition.d.ts +161 -0
- package/models/components/sdktooldefinition.d.ts.map +1 -0
- package/models/components/sdktooldefinition.js +175 -0
- package/models/components/sdktooldefinition.js.map +1 -0
- package/models/components/testmessage.d.ts +2 -0
- package/models/components/testmessage.d.ts.map +1 -1
- package/models/components/testmessage.js +4 -0
- package/models/components/testmessage.js.map +1 -1
- package/models/components/tool.d.ts +3 -29
- package/models/components/tool.d.ts.map +1 -1
- package/models/components/tool.js +4 -26
- package/models/components/tool.js.map +1 -1
- package/models/components/toolcreate.d.ts +3 -29
- package/models/components/toolcreate.d.ts.map +1 -1
- package/models/components/toolcreate.js +4 -26
- package/models/components/toolcreate.js.map +1 -1
- package/models/components/toolparameterdefault.d.ts +36 -0
- package/models/components/toolparameterdefault.d.ts.map +1 -0
- package/models/components/toolparameterdefault.js +60 -0
- package/models/components/toolparameterdefault.js.map +1 -0
- package/models/components/toolparametertransform.d.ts +81 -0
- package/models/components/toolparametertransform.d.ts.map +1 -0
- package/models/components/toolparametertransform.js +88 -0
- package/models/components/toolparametertransform.js.map +1 -0
- package/models/components/toolparametertransformcondition.d.ts +45 -0
- package/models/components/toolparametertransformcondition.d.ts.map +1 -0
- package/models/components/toolparametertransformcondition.js +63 -0
- package/models/components/toolparametertransformcondition.js.map +1 -0
- package/models/components/toolupdate.d.ts +3 -29
- package/models/components/toolupdate.d.ts.map +1 -1
- package/models/components/toolupdate.js +4 -26
- package/models/components/toolupdate.js.map +1 -1
- package/package.json +1 -1
- package/sdk/sdk.d.ts +0 -3
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +0 -5
- package/sdk/sdk.js.map +1 -1
- package/src/lib/config.ts +6 -6
- package/src/models/components/channeltarget.ts +32 -32
- package/src/models/components/channeltargetcreaterequest.ts +24 -24
- package/src/models/components/channeltargetupdaterequest.ts +24 -24
- package/src/models/components/function.ts +136 -0
- package/src/models/components/httpendpoint.ts +158 -0
- package/src/models/components/index.ts +7 -0
- package/src/models/components/sdkinternaltool.ts +88 -0
- package/src/models/components/sdktooldefinition.ts +298 -0
- package/src/models/components/testmessage.ts +6 -0
- package/src/models/components/tool.ts +10 -56
- package/src/models/components/toolcreate.ts +10 -60
- package/src/models/components/toolparameterdefault.ts +78 -0
- package/src/models/components/toolparametertransform.ts +125 -0
- package/src/models/components/toolparametertransformcondition.ts +88 -0
- package/src/models/components/toolupdate.ts +10 -60
- package/src/sdk/sdk.ts +0 -6
- package/docs/sdks/v1/README.md +0 -629
- package/funcs/v1AgentGetAvailableVoices.d.ts +0 -15
- package/funcs/v1AgentGetAvailableVoices.d.ts.map +0 -1
- package/funcs/v1AgentGetAvailableVoices.js +0 -87
- package/funcs/v1AgentGetAvailableVoices.js.map +0 -1
- package/funcs/v1Create.d.ts +0 -16
- package/funcs/v1Create.d.ts.map +0 -1
- package/funcs/v1Create.js +0 -100
- package/funcs/v1Create.js.map +0 -1
- package/funcs/v1Delete.d.ts +0 -16
- package/funcs/v1Delete.d.ts.map +0 -1
- package/funcs/v1Delete.js +0 -106
- package/funcs/v1Delete.js.map +0 -1
- package/funcs/v1DirectoryMemberBulkLoad.d.ts +0 -16
- package/funcs/v1DirectoryMemberBulkLoad.d.ts.map +0 -1
- package/funcs/v1DirectoryMemberBulkLoad.js +0 -113
- package/funcs/v1DirectoryMemberBulkLoad.js.map +0 -1
- package/funcs/v1DirectoryMemberDownload.d.ts +0 -14
- package/funcs/v1DirectoryMemberDownload.d.ts.map +0 -1
- package/funcs/v1DirectoryMemberDownload.js +0 -86
- package/funcs/v1DirectoryMemberDownload.js.map +0 -1
- package/funcs/v1GetById.d.ts +0 -17
- package/funcs/v1GetById.d.ts.map +0 -1
- package/funcs/v1GetById.js +0 -106
- package/funcs/v1GetById.js.map +0 -1
- package/funcs/v1List.d.ts +0 -17
- package/funcs/v1List.d.ts.map +0 -1
- package/funcs/v1List.js +0 -112
- package/funcs/v1List.js.map +0 -1
- package/funcs/v1Update.d.ts +0 -17
- package/funcs/v1Update.d.ts.map +0 -1
- package/funcs/v1Update.js +0 -107
- package/funcs/v1Update.js.map +0 -1
- package/sdk/v1.d.ts +0 -62
- package/sdk/v1.d.ts.map +0 -1
- package/sdk/v1.js +0 -92
- package/sdk/v1.js.map +0 -1
- package/src/funcs/v1AgentGetAvailableVoices.ts +0 -109
- package/src/funcs/v1Create.ts +0 -132
- package/src/funcs/v1Delete.ts +0 -140
- package/src/funcs/v1DirectoryMemberBulkLoad.ts +0 -149
- package/src/funcs/v1DirectoryMemberDownload.ts +0 -108
- package/src/funcs/v1GetById.ts +0 -140
- package/src/funcs/v1List.ts +0 -146
- package/src/funcs/v1Update.ts +0 -141
- package/src/sdk/v1.ts +0 -150
package/sdk/sdk.js
CHANGED
|
@@ -16,16 +16,11 @@ const services_js_1 = require("./services.js");
|
|
|
16
16
|
const sessionlabels_js_1 = require("./sessionlabels.js");
|
|
17
17
|
const sessions_js_1 = require("./sessions.js");
|
|
18
18
|
const tools_js_1 = require("./tools.js");
|
|
19
|
-
const v1_js_1 = require("./v1.js");
|
|
20
19
|
class SyllableSDK extends sdks_js_1.ClientSDK {
|
|
21
20
|
get agents() {
|
|
22
21
|
var _a;
|
|
23
22
|
return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new agents_js_1.Agents(this._options)));
|
|
24
23
|
}
|
|
25
|
-
get v1() {
|
|
26
|
-
var _a;
|
|
27
|
-
return ((_a = this._v1) !== null && _a !== void 0 ? _a : (this._v1 = new v1_js_1.V1(this._options)));
|
|
28
|
-
}
|
|
29
24
|
get channels() {
|
|
30
25
|
var _a;
|
|
31
26
|
return ((_a = this._channels) !== null && _a !== void 0 ? _a : (this._channels = new channels_js_1.Channels(this._options)));
|
package/sdk/sdk.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../src/sdk/sdk.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,4CAA2C;AAC3C,2CAAqC;AACrC,+CAAyC;AACzC,yDAAmD;AACnD,2DAAqD;AACrD,iDAA2C;AAC3C,2CAAqC;AACrC,6CAAuC;AACvC,+CAAyC;AACzC,yDAAmD;AACnD,+CAAyC;AACzC,yCAAmC;
|
|
1
|
+
{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../src/sdk/sdk.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,4CAA2C;AAC3C,2CAAqC;AACrC,+CAAyC;AACzC,yDAAmD;AACnD,2DAAqD;AACrD,iDAA2C;AAC3C,2CAAqC;AACrC,6CAAuC;AACvC,+CAAyC;AACzC,yDAAmD;AACnD,+CAAyC;AACzC,yCAAmC;AAEnC,MAAa,WAAY,SAAQ,mBAAS;IAExC,IAAI,MAAM;;QACR,OAAO,OAAC,IAAI,CAAC,OAAO,oCAAZ,IAAI,CAAC,OAAO,GAAK,IAAI,kBAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IACtD,CAAC;IAGD,IAAI,QAAQ;;QACV,OAAO,OAAC,IAAI,CAAC,SAAS,oCAAd,IAAI,CAAC,SAAS,GAAK,IAAI,sBAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAC1D,CAAC;IAGD,IAAI,aAAa;;QACf,OAAO,OAAC,IAAI,CAAC,cAAc,oCAAnB,IAAI,CAAC,cAAc,GAAK,IAAI,gCAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IACpE,CAAC;IAGD,IAAI,MAAM;;QACR,OAAO,OAAC,IAAI,CAAC,OAAO,oCAAZ,IAAI,CAAC,OAAO,GAAK,IAAI,kBAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IACtD,CAAC;IAGD,IAAI,cAAc;;QAChB,OAAO,OAAC,IAAI,CAAC,eAAe,oCAApB,IAAI,CAAC,eAAe,GAAK,IAAI,kCAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IACtE,CAAC;IAGD,IAAI,OAAO;;QACT,OAAO,OAAC,IAAI,CAAC,QAAQ,oCAAb,IAAI,CAAC,QAAQ,GAAK,IAAI,oBAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IACxD,CAAC;IAGD,IAAI,QAAQ;;QACV,OAAO,OAAC,IAAI,CAAC,SAAS,oCAAd,IAAI,CAAC,SAAS,GAAK,IAAI,sBAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAC1D,CAAC;IAGD,IAAI,aAAa;;QACf,OAAO,OAAC,IAAI,CAAC,cAAc,oCAAnB,IAAI,CAAC,cAAc,GAAK,IAAI,gCAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IACpE,CAAC;IAGD,IAAI,QAAQ;;QACV,OAAO,OAAC,IAAI,CAAC,SAAS,oCAAd,IAAI,CAAC,SAAS,GAAK,IAAI,sBAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAC1D,CAAC;IAGD,IAAI,KAAK;;QACP,OAAO,OAAC,IAAI,CAAC,MAAM,oCAAX,IAAI,CAAC,MAAM,GAAK,IAAI,gBAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IACpD,CAAC;IAGD,IAAI,SAAS;;QACX,OAAO,OAAC,IAAI,CAAC,UAAU,oCAAf,IAAI,CAAC,UAAU,GAAK,IAAI,wBAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAC5D,CAAC;CACF;AAvDD,kCAuDC"}
|
package/src/lib/config.ts
CHANGED
|
@@ -12,13 +12,13 @@ import { Params, pathToFunc } from "./url.js";
|
|
|
12
12
|
*/
|
|
13
13
|
export const ServerList = [
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* API server
|
|
16
16
|
*/
|
|
17
|
-
"
|
|
17
|
+
"https://api.syllable.ai",
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* Trial API server
|
|
20
20
|
*/
|
|
21
|
-
"
|
|
21
|
+
"https://trial.api.syllable.ai",
|
|
22
22
|
] as const;
|
|
23
23
|
|
|
24
24
|
export type SDKOptions = {
|
|
@@ -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.
|
|
64
|
+
sdkVersion: "0.1.0-alpha.28",
|
|
65
65
|
genVersion: "2.481.0",
|
|
66
66
|
userAgent:
|
|
67
|
-
"speakeasy-sdk/typescript 0.1.0-alpha.
|
|
67
|
+
"speakeasy-sdk/typescript 0.1.0-alpha.28 2.481.0 0.0.2 syllable-sdk",
|
|
68
68
|
} as const;
|
|
@@ -19,14 +19,14 @@ import {
|
|
|
19
19
|
*/
|
|
20
20
|
export type ChannelTarget = {
|
|
21
21
|
id: number;
|
|
22
|
-
channelId: number
|
|
23
|
-
channelName: string
|
|
24
|
-
agentId: number
|
|
25
|
-
agent: DaoChannelTargetAgent
|
|
26
|
-
target: string
|
|
27
|
-
targetMode: string
|
|
28
|
-
fallbackTarget
|
|
29
|
-
isTest
|
|
22
|
+
channelId: number;
|
|
23
|
+
channelName: string;
|
|
24
|
+
agentId: number;
|
|
25
|
+
agent: DaoChannelTargetAgent;
|
|
26
|
+
target: string;
|
|
27
|
+
targetMode: string;
|
|
28
|
+
fallbackTarget?: string | null | undefined;
|
|
29
|
+
isTest?: boolean | undefined;
|
|
30
30
|
updatedAt: Date | null;
|
|
31
31
|
lastUpdatedBy: string | null;
|
|
32
32
|
};
|
|
@@ -38,14 +38,14 @@ export const ChannelTarget$inboundSchema: z.ZodType<
|
|
|
38
38
|
unknown
|
|
39
39
|
> = z.object({
|
|
40
40
|
id: z.number().int(),
|
|
41
|
-
channel_id: z.
|
|
42
|
-
channel_name: z.
|
|
43
|
-
agent_id: z.
|
|
44
|
-
agent:
|
|
45
|
-
target: z.
|
|
46
|
-
target_mode: z.
|
|
47
|
-
fallback_target: z.nullable(z.string()),
|
|
48
|
-
is_test: z.
|
|
41
|
+
channel_id: z.number().int(),
|
|
42
|
+
channel_name: z.string(),
|
|
43
|
+
agent_id: z.number().int(),
|
|
44
|
+
agent: DaoChannelTargetAgent$inboundSchema,
|
|
45
|
+
target: z.string(),
|
|
46
|
+
target_mode: z.string(),
|
|
47
|
+
fallback_target: z.nullable(z.string()).optional(),
|
|
48
|
+
is_test: z.boolean().default(false),
|
|
49
49
|
updated_at: z.nullable(
|
|
50
50
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
51
51
|
),
|
|
@@ -66,14 +66,14 @@ export const ChannelTarget$inboundSchema: z.ZodType<
|
|
|
66
66
|
/** @internal */
|
|
67
67
|
export type ChannelTarget$Outbound = {
|
|
68
68
|
id: number;
|
|
69
|
-
channel_id: number
|
|
70
|
-
channel_name: string
|
|
71
|
-
agent_id: number
|
|
72
|
-
agent: DaoChannelTargetAgent$Outbound
|
|
73
|
-
target: string
|
|
74
|
-
target_mode: string
|
|
75
|
-
fallback_target
|
|
76
|
-
is_test: boolean
|
|
69
|
+
channel_id: number;
|
|
70
|
+
channel_name: string;
|
|
71
|
+
agent_id: number;
|
|
72
|
+
agent: DaoChannelTargetAgent$Outbound;
|
|
73
|
+
target: string;
|
|
74
|
+
target_mode: string;
|
|
75
|
+
fallback_target?: string | null | undefined;
|
|
76
|
+
is_test: boolean;
|
|
77
77
|
updated_at: string | null;
|
|
78
78
|
last_updated_by: string | null;
|
|
79
79
|
};
|
|
@@ -85,14 +85,14 @@ export const ChannelTarget$outboundSchema: z.ZodType<
|
|
|
85
85
|
ChannelTarget
|
|
86
86
|
> = z.object({
|
|
87
87
|
id: z.number().int(),
|
|
88
|
-
channelId: z.
|
|
89
|
-
channelName: z.
|
|
90
|
-
agentId: z.
|
|
91
|
-
agent:
|
|
92
|
-
target: z.
|
|
93
|
-
targetMode: z.
|
|
94
|
-
fallbackTarget: z.nullable(z.string()),
|
|
95
|
-
isTest: z.
|
|
88
|
+
channelId: z.number().int(),
|
|
89
|
+
channelName: z.string(),
|
|
90
|
+
agentId: z.number().int(),
|
|
91
|
+
agent: DaoChannelTargetAgent$outboundSchema,
|
|
92
|
+
target: z.string(),
|
|
93
|
+
targetMode: z.string(),
|
|
94
|
+
fallbackTarget: z.nullable(z.string()).optional(),
|
|
95
|
+
isTest: z.boolean().default(false),
|
|
96
96
|
updatedAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
97
97
|
lastUpdatedBy: z.nullable(z.string()),
|
|
98
98
|
}).transform((v) => {
|
|
@@ -9,12 +9,12 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
|
|
11
11
|
export type ChannelTargetCreateRequest = {
|
|
12
|
-
channelId: number
|
|
13
|
-
agentId: number
|
|
14
|
-
target: string
|
|
15
|
-
targetMode: string
|
|
16
|
-
fallbackTarget
|
|
17
|
-
isTest
|
|
12
|
+
channelId: number;
|
|
13
|
+
agentId: number;
|
|
14
|
+
target: string;
|
|
15
|
+
targetMode: string;
|
|
16
|
+
fallbackTarget?: string | null | undefined;
|
|
17
|
+
isTest?: boolean | undefined;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
/** @internal */
|
|
@@ -23,12 +23,12 @@ export const ChannelTargetCreateRequest$inboundSchema: z.ZodType<
|
|
|
23
23
|
z.ZodTypeDef,
|
|
24
24
|
unknown
|
|
25
25
|
> = z.object({
|
|
26
|
-
channel_id: z.
|
|
27
|
-
agent_id: z.
|
|
28
|
-
target: z.
|
|
29
|
-
target_mode: z.
|
|
30
|
-
fallback_target: z.nullable(z.string()),
|
|
31
|
-
is_test: z.
|
|
26
|
+
channel_id: z.number().int(),
|
|
27
|
+
agent_id: z.number().int(),
|
|
28
|
+
target: z.string(),
|
|
29
|
+
target_mode: z.string(),
|
|
30
|
+
fallback_target: z.nullable(z.string()).optional(),
|
|
31
|
+
is_test: z.boolean().default(false),
|
|
32
32
|
}).transform((v) => {
|
|
33
33
|
return remap$(v, {
|
|
34
34
|
"channel_id": "channelId",
|
|
@@ -41,12 +41,12 @@ export const ChannelTargetCreateRequest$inboundSchema: z.ZodType<
|
|
|
41
41
|
|
|
42
42
|
/** @internal */
|
|
43
43
|
export type ChannelTargetCreateRequest$Outbound = {
|
|
44
|
-
channel_id: number
|
|
45
|
-
agent_id: number
|
|
46
|
-
target: string
|
|
47
|
-
target_mode: string
|
|
48
|
-
fallback_target
|
|
49
|
-
is_test: boolean
|
|
44
|
+
channel_id: number;
|
|
45
|
+
agent_id: number;
|
|
46
|
+
target: string;
|
|
47
|
+
target_mode: string;
|
|
48
|
+
fallback_target?: string | null | undefined;
|
|
49
|
+
is_test: boolean;
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
/** @internal */
|
|
@@ -55,12 +55,12 @@ export const ChannelTargetCreateRequest$outboundSchema: z.ZodType<
|
|
|
55
55
|
z.ZodTypeDef,
|
|
56
56
|
ChannelTargetCreateRequest
|
|
57
57
|
> = z.object({
|
|
58
|
-
channelId: z.
|
|
59
|
-
agentId: z.
|
|
60
|
-
target: z.
|
|
61
|
-
targetMode: z.
|
|
62
|
-
fallbackTarget: z.nullable(z.string()),
|
|
63
|
-
isTest: z.
|
|
58
|
+
channelId: z.number().int(),
|
|
59
|
+
agentId: z.number().int(),
|
|
60
|
+
target: z.string(),
|
|
61
|
+
targetMode: z.string(),
|
|
62
|
+
fallbackTarget: z.nullable(z.string()).optional(),
|
|
63
|
+
isTest: z.boolean().default(false),
|
|
64
64
|
}).transform((v) => {
|
|
65
65
|
return remap$(v, {
|
|
66
66
|
channelId: "channel_id",
|
|
@@ -10,12 +10,12 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
10
10
|
|
|
11
11
|
export type ChannelTargetUpdateRequest = {
|
|
12
12
|
id: number;
|
|
13
|
-
channelId: number
|
|
14
|
-
agentId: number
|
|
15
|
-
target: string
|
|
16
|
-
targetMode: string
|
|
17
|
-
fallbackTarget
|
|
18
|
-
isTest
|
|
13
|
+
channelId: number;
|
|
14
|
+
agentId: number;
|
|
15
|
+
target: string;
|
|
16
|
+
targetMode: string;
|
|
17
|
+
fallbackTarget?: string | null | undefined;
|
|
18
|
+
isTest?: boolean | undefined;
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
/** @internal */
|
|
@@ -25,12 +25,12 @@ export const ChannelTargetUpdateRequest$inboundSchema: z.ZodType<
|
|
|
25
25
|
unknown
|
|
26
26
|
> = z.object({
|
|
27
27
|
id: z.number().int(),
|
|
28
|
-
channel_id: z.
|
|
29
|
-
agent_id: z.
|
|
30
|
-
target: z.
|
|
31
|
-
target_mode: z.
|
|
32
|
-
fallback_target: z.nullable(z.string()),
|
|
33
|
-
is_test: z.
|
|
28
|
+
channel_id: z.number().int(),
|
|
29
|
+
agent_id: z.number().int(),
|
|
30
|
+
target: z.string(),
|
|
31
|
+
target_mode: z.string(),
|
|
32
|
+
fallback_target: z.nullable(z.string()).optional(),
|
|
33
|
+
is_test: z.boolean().default(false),
|
|
34
34
|
}).transform((v) => {
|
|
35
35
|
return remap$(v, {
|
|
36
36
|
"channel_id": "channelId",
|
|
@@ -44,12 +44,12 @@ export const ChannelTargetUpdateRequest$inboundSchema: z.ZodType<
|
|
|
44
44
|
/** @internal */
|
|
45
45
|
export type ChannelTargetUpdateRequest$Outbound = {
|
|
46
46
|
id: number;
|
|
47
|
-
channel_id: number
|
|
48
|
-
agent_id: number
|
|
49
|
-
target: string
|
|
50
|
-
target_mode: string
|
|
51
|
-
fallback_target
|
|
52
|
-
is_test: boolean
|
|
47
|
+
channel_id: number;
|
|
48
|
+
agent_id: number;
|
|
49
|
+
target: string;
|
|
50
|
+
target_mode: string;
|
|
51
|
+
fallback_target?: string | null | undefined;
|
|
52
|
+
is_test: boolean;
|
|
53
53
|
};
|
|
54
54
|
|
|
55
55
|
/** @internal */
|
|
@@ -59,12 +59,12 @@ export const ChannelTargetUpdateRequest$outboundSchema: z.ZodType<
|
|
|
59
59
|
ChannelTargetUpdateRequest
|
|
60
60
|
> = z.object({
|
|
61
61
|
id: z.number().int(),
|
|
62
|
-
channelId: z.
|
|
63
|
-
agentId: z.
|
|
64
|
-
target: z.
|
|
65
|
-
targetMode: z.
|
|
66
|
-
fallbackTarget: z.nullable(z.string()),
|
|
67
|
-
isTest: z.
|
|
62
|
+
channelId: z.number().int(),
|
|
63
|
+
agentId: z.number().int(),
|
|
64
|
+
target: z.string(),
|
|
65
|
+
targetMode: z.string(),
|
|
66
|
+
fallbackTarget: z.nullable(z.string()).optional(),
|
|
67
|
+
isTest: z.boolean().default(false),
|
|
68
68
|
}).transform((v) => {
|
|
69
69
|
return remap$(v, {
|
|
70
70
|
channelId: "channel_id",
|
|
@@ -0,0 +1,136 @@
|
|
|
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
|
+
/**
|
|
11
|
+
* The JSON Schema of parameters of the function/tool call.
|
|
12
|
+
*/
|
|
13
|
+
export type ParametersT = {};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* A tool definition to be used by the OpenAI API.
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
*
|
|
20
|
+
* See:
|
|
21
|
+
* - https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/function-calling
|
|
22
|
+
*/
|
|
23
|
+
export type FunctionT = {
|
|
24
|
+
/**
|
|
25
|
+
* The name of the function/tool call.
|
|
26
|
+
*/
|
|
27
|
+
name: string;
|
|
28
|
+
/**
|
|
29
|
+
* The description of the tool.
|
|
30
|
+
*/
|
|
31
|
+
description: string;
|
|
32
|
+
/**
|
|
33
|
+
* The JSON Schema of parameters of the function/tool call.
|
|
34
|
+
*/
|
|
35
|
+
parameters: ParametersT;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const ParametersT$inboundSchema: z.ZodType<
|
|
40
|
+
ParametersT,
|
|
41
|
+
z.ZodTypeDef,
|
|
42
|
+
unknown
|
|
43
|
+
> = z.object({});
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export type ParametersT$Outbound = {};
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const ParametersT$outboundSchema: z.ZodType<
|
|
50
|
+
ParametersT$Outbound,
|
|
51
|
+
z.ZodTypeDef,
|
|
52
|
+
ParametersT
|
|
53
|
+
> = z.object({});
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @internal
|
|
57
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
58
|
+
*/
|
|
59
|
+
export namespace ParametersT$ {
|
|
60
|
+
/** @deprecated use `ParametersT$inboundSchema` instead. */
|
|
61
|
+
export const inboundSchema = ParametersT$inboundSchema;
|
|
62
|
+
/** @deprecated use `ParametersT$outboundSchema` instead. */
|
|
63
|
+
export const outboundSchema = ParametersT$outboundSchema;
|
|
64
|
+
/** @deprecated use `ParametersT$Outbound` instead. */
|
|
65
|
+
export type Outbound = ParametersT$Outbound;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function parametersToJSON(parametersT: ParametersT): string {
|
|
69
|
+
return JSON.stringify(ParametersT$outboundSchema.parse(parametersT));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function parametersFromJSON(
|
|
73
|
+
jsonString: string,
|
|
74
|
+
): SafeParseResult<ParametersT, SDKValidationError> {
|
|
75
|
+
return safeParse(
|
|
76
|
+
jsonString,
|
|
77
|
+
(x) => ParametersT$inboundSchema.parse(JSON.parse(x)),
|
|
78
|
+
`Failed to parse 'ParametersT' from JSON`,
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** @internal */
|
|
83
|
+
export const FunctionT$inboundSchema: z.ZodType<
|
|
84
|
+
FunctionT,
|
|
85
|
+
z.ZodTypeDef,
|
|
86
|
+
unknown
|
|
87
|
+
> = z.object({
|
|
88
|
+
name: z.string(),
|
|
89
|
+
description: z.string(),
|
|
90
|
+
parameters: z.lazy(() => ParametersT$inboundSchema),
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
/** @internal */
|
|
94
|
+
export type FunctionT$Outbound = {
|
|
95
|
+
name: string;
|
|
96
|
+
description: string;
|
|
97
|
+
parameters: ParametersT$Outbound;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
/** @internal */
|
|
101
|
+
export const FunctionT$outboundSchema: z.ZodType<
|
|
102
|
+
FunctionT$Outbound,
|
|
103
|
+
z.ZodTypeDef,
|
|
104
|
+
FunctionT
|
|
105
|
+
> = z.object({
|
|
106
|
+
name: z.string(),
|
|
107
|
+
description: z.string(),
|
|
108
|
+
parameters: z.lazy(() => ParametersT$outboundSchema),
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* @internal
|
|
113
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
114
|
+
*/
|
|
115
|
+
export namespace FunctionT$ {
|
|
116
|
+
/** @deprecated use `FunctionT$inboundSchema` instead. */
|
|
117
|
+
export const inboundSchema = FunctionT$inboundSchema;
|
|
118
|
+
/** @deprecated use `FunctionT$outboundSchema` instead. */
|
|
119
|
+
export const outboundSchema = FunctionT$outboundSchema;
|
|
120
|
+
/** @deprecated use `FunctionT$Outbound` instead. */
|
|
121
|
+
export type Outbound = FunctionT$Outbound;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function functionToJSON(functionT: FunctionT): string {
|
|
125
|
+
return JSON.stringify(FunctionT$outboundSchema.parse(functionT));
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export function functionFromJSON(
|
|
129
|
+
jsonString: string,
|
|
130
|
+
): SafeParseResult<FunctionT, SDKValidationError> {
|
|
131
|
+
return safeParse(
|
|
132
|
+
jsonString,
|
|
133
|
+
(x) => FunctionT$inboundSchema.parse(JSON.parse(x)),
|
|
134
|
+
`Failed to parse 'FunctionT' from JSON`,
|
|
135
|
+
);
|
|
136
|
+
}
|
|
@@ -0,0 +1,158 @@
|
|
|
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 { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The HTTP method to use for the service call.
|
|
14
|
+
*/
|
|
15
|
+
export const Method = {
|
|
16
|
+
Get: "get",
|
|
17
|
+
Post: "post",
|
|
18
|
+
} as const;
|
|
19
|
+
/**
|
|
20
|
+
* The HTTP method to use for the service call.
|
|
21
|
+
*/
|
|
22
|
+
export type Method = ClosedEnum<typeof Method>;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* How to pass the arguments to the request.
|
|
26
|
+
*/
|
|
27
|
+
export const ArgumentLocation = {
|
|
28
|
+
Body: "body",
|
|
29
|
+
Form: "form",
|
|
30
|
+
Path: "path",
|
|
31
|
+
Query: "query",
|
|
32
|
+
} as const;
|
|
33
|
+
/**
|
|
34
|
+
* How to pass the arguments to the request.
|
|
35
|
+
*/
|
|
36
|
+
export type ArgumentLocation = ClosedEnum<typeof ArgumentLocation>;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* The configuration for an HTTP API call.
|
|
40
|
+
*/
|
|
41
|
+
export type HttpEndpoint = {
|
|
42
|
+
/**
|
|
43
|
+
* The endpoint URL of the external service to call.
|
|
44
|
+
*/
|
|
45
|
+
url: string;
|
|
46
|
+
/**
|
|
47
|
+
* The HTTP method to use for the service call.
|
|
48
|
+
*/
|
|
49
|
+
method: Method;
|
|
50
|
+
/**
|
|
51
|
+
* How to pass the arguments to the request.
|
|
52
|
+
*/
|
|
53
|
+
argumentLocation: ArgumentLocation;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/** @internal */
|
|
57
|
+
export const Method$inboundSchema: z.ZodNativeEnum<typeof Method> = z
|
|
58
|
+
.nativeEnum(Method);
|
|
59
|
+
|
|
60
|
+
/** @internal */
|
|
61
|
+
export const Method$outboundSchema: z.ZodNativeEnum<typeof Method> =
|
|
62
|
+
Method$inboundSchema;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @internal
|
|
66
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
67
|
+
*/
|
|
68
|
+
export namespace Method$ {
|
|
69
|
+
/** @deprecated use `Method$inboundSchema` instead. */
|
|
70
|
+
export const inboundSchema = Method$inboundSchema;
|
|
71
|
+
/** @deprecated use `Method$outboundSchema` instead. */
|
|
72
|
+
export const outboundSchema = Method$outboundSchema;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** @internal */
|
|
76
|
+
export const ArgumentLocation$inboundSchema: z.ZodNativeEnum<
|
|
77
|
+
typeof ArgumentLocation
|
|
78
|
+
> = z.nativeEnum(ArgumentLocation);
|
|
79
|
+
|
|
80
|
+
/** @internal */
|
|
81
|
+
export const ArgumentLocation$outboundSchema: z.ZodNativeEnum<
|
|
82
|
+
typeof ArgumentLocation
|
|
83
|
+
> = ArgumentLocation$inboundSchema;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @internal
|
|
87
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
88
|
+
*/
|
|
89
|
+
export namespace ArgumentLocation$ {
|
|
90
|
+
/** @deprecated use `ArgumentLocation$inboundSchema` instead. */
|
|
91
|
+
export const inboundSchema = ArgumentLocation$inboundSchema;
|
|
92
|
+
/** @deprecated use `ArgumentLocation$outboundSchema` instead. */
|
|
93
|
+
export const outboundSchema = ArgumentLocation$outboundSchema;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** @internal */
|
|
97
|
+
export const HttpEndpoint$inboundSchema: z.ZodType<
|
|
98
|
+
HttpEndpoint,
|
|
99
|
+
z.ZodTypeDef,
|
|
100
|
+
unknown
|
|
101
|
+
> = z.object({
|
|
102
|
+
url: z.string(),
|
|
103
|
+
method: Method$inboundSchema,
|
|
104
|
+
argument_location: ArgumentLocation$inboundSchema,
|
|
105
|
+
}).transform((v) => {
|
|
106
|
+
return remap$(v, {
|
|
107
|
+
"argument_location": "argumentLocation",
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
/** @internal */
|
|
112
|
+
export type HttpEndpoint$Outbound = {
|
|
113
|
+
url: string;
|
|
114
|
+
method: string;
|
|
115
|
+
argument_location: string;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
/** @internal */
|
|
119
|
+
export const HttpEndpoint$outboundSchema: z.ZodType<
|
|
120
|
+
HttpEndpoint$Outbound,
|
|
121
|
+
z.ZodTypeDef,
|
|
122
|
+
HttpEndpoint
|
|
123
|
+
> = z.object({
|
|
124
|
+
url: z.string(),
|
|
125
|
+
method: Method$outboundSchema,
|
|
126
|
+
argumentLocation: ArgumentLocation$outboundSchema,
|
|
127
|
+
}).transform((v) => {
|
|
128
|
+
return remap$(v, {
|
|
129
|
+
argumentLocation: "argument_location",
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* @internal
|
|
135
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
136
|
+
*/
|
|
137
|
+
export namespace HttpEndpoint$ {
|
|
138
|
+
/** @deprecated use `HttpEndpoint$inboundSchema` instead. */
|
|
139
|
+
export const inboundSchema = HttpEndpoint$inboundSchema;
|
|
140
|
+
/** @deprecated use `HttpEndpoint$outboundSchema` instead. */
|
|
141
|
+
export const outboundSchema = HttpEndpoint$outboundSchema;
|
|
142
|
+
/** @deprecated use `HttpEndpoint$Outbound` instead. */
|
|
143
|
+
export type Outbound = HttpEndpoint$Outbound;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export function httpEndpointToJSON(httpEndpoint: HttpEndpoint): string {
|
|
147
|
+
return JSON.stringify(HttpEndpoint$outboundSchema.parse(httpEndpoint));
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export function httpEndpointFromJSON(
|
|
151
|
+
jsonString: string,
|
|
152
|
+
): SafeParseResult<HttpEndpoint, SDKValidationError> {
|
|
153
|
+
return safeParse(
|
|
154
|
+
jsonString,
|
|
155
|
+
(x) => HttpEndpoint$inboundSchema.parse(JSON.parse(x)),
|
|
156
|
+
`Failed to parse 'HttpEndpoint' from JSON`,
|
|
157
|
+
);
|
|
158
|
+
}
|
|
@@ -37,6 +37,8 @@ export * from "./directorymembercreate.js";
|
|
|
37
37
|
export * from "./directorymemberproperties.js";
|
|
38
38
|
export * from "./event.js";
|
|
39
39
|
export * from "./eventproperties.js";
|
|
40
|
+
export * from "./function.js";
|
|
41
|
+
export * from "./httpendpoint.js";
|
|
40
42
|
export * from "./listresponseagentresponse.js";
|
|
41
43
|
export * from "./listresponseavailabletarget.js";
|
|
42
44
|
export * from "./listresponsechannel.js";
|
|
@@ -58,6 +60,8 @@ export * from "./prompthistory.js";
|
|
|
58
60
|
export * from "./promptproperties.js";
|
|
59
61
|
export * from "./promptupdate.js";
|
|
60
62
|
export * from "./provider.js";
|
|
63
|
+
export * from "./sdkinternaltool.js";
|
|
64
|
+
export * from "./sdktooldefinition.js";
|
|
61
65
|
export * from "./security.js";
|
|
62
66
|
export * from "./service.js";
|
|
63
67
|
export * from "./servicecreate.js";
|
|
@@ -80,6 +84,9 @@ export * from "./testmessageresponse.js";
|
|
|
80
84
|
export * from "./tool.js";
|
|
81
85
|
export * from "./toolcreate.js";
|
|
82
86
|
export * from "./tooldetailresponse.js";
|
|
87
|
+
export * from "./toolparameterdefault.js";
|
|
88
|
+
export * from "./toolparametertransform.js";
|
|
89
|
+
export * from "./toolparametertransformcondition.js";
|
|
83
90
|
export * from "./toolproperties.js";
|
|
84
91
|
export * from "./toolupdate.js";
|
|
85
92
|
export * from "./validationerror.js";
|