syllable-sdk 0.1.0-alpha.25 → 0.1.0-alpha.27
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/api-reference/sdks/agents/README.md +224 -0
- package/api-reference/sdks/availabletargets/README.md +49 -0
- package/api-reference/sdks/channels/README.md +92 -0
- package/api-reference/sdks/chats/README.md +55 -0
- package/api-reference/sdks/conversations/README.md +91 -0
- package/api-reference/sdks/dashboards/README.md +321 -0
- package/api-reference/sdks/events/README.md +50 -0
- package/api-reference/sdks/greetings/README.md +223 -0
- package/api-reference/sdks/organizations/README.md +48 -0
- package/api-reference/sdks/prompts/README.md +225 -0
- package/api-reference/sdks/sessions/README.md +50 -0
- package/api-reference/sdks/syllable/README.md +22 -0
- package/api-reference/sdks/targets/README.md +194 -0
- package/api-reference/sdks/tools/README.md +92 -0
- package/docs/sdks/channels/README.md +2 -2
- package/docs/sdks/targets/README.md +2 -4
- package/funcs/channelsDelete.d.ts +4 -2
- package/funcs/channelsDelete.d.ts.map +1 -1
- package/funcs/channelsDelete.js +5 -2
- package/funcs/channelsDelete.js.map +1 -1
- package/funcs/channelsTargetsUpdate.d.ts.map +1 -1
- package/funcs/channelsTargetsUpdate.js +3 -1
- package/funcs/channelsTargetsUpdate.js.map +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +7 -7
- package/lib/config.js.map +1 -1
- 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/channeltarget.d.ts +10 -0
- package/models/components/channeltarget.d.ts.map +1 -1
- package/models/components/channeltarget.js +11 -0
- package/models/components/channeltarget.js.map +1 -1
- package/models/components/channeltargetupdaterequest.d.ts +41 -0
- package/models/components/channeltargetupdaterequest.d.ts.map +1 -0
- package/models/components/channeltargetupdaterequest.js +88 -0
- package/models/components/channeltargetupdaterequest.js.map +1 -0
- package/models/components/daochanneltargetagent.d.ts +47 -0
- package/models/components/daochanneltargetagent.d.ts.map +1 -0
- package/models/components/daochanneltargetagent.js +92 -0
- package/models/components/daochanneltargetagent.js.map +1 -0
- package/models/components/index.d.ts +2 -1
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +2 -1
- package/models/components/index.js.map +1 -1
- 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 +3 -0
- package/models/components/prompt.d.ts.map +1 -1
- 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/promptupdate.d.ts +3 -0
- package/models/components/promptupdate.d.ts.map +1 -1
- package/models/components/promptupdate.js.map +1 -1
- package/models/components/target.d.ts +3 -0
- package/models/components/target.d.ts.map +1 -1
- package/models/components/target.js.map +1 -1
- 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/operations/channeltargetsupdate.d.ts +2 -2
- package/models/operations/channeltargetsupdate.d.ts.map +1 -1
- package/models/operations/channeltargetsupdate.js +4 -4
- package/models/operations/channeltargetsupdate.js.map +1 -1
- package/package.json +1 -1
- package/sdk/channels.d.ts +4 -1
- package/sdk/channels.d.ts.map +1 -1
- package/sdk/channels.js +3 -0
- package/sdk/channels.js.map +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/funcs/channelsDelete.ts +7 -4
- package/src/funcs/channelsTargetsUpdate.ts +3 -1
- package/src/lib/config.ts +7 -7
- package/src/models/components/channel.ts +3 -0
- package/src/models/components/channeltarget.ts +27 -0
- package/src/models/components/channeltargetupdaterequest.ts +107 -0
- package/src/models/components/daochanneltargetagent.ts +117 -0
- package/src/models/components/index.ts +2 -1
- package/src/models/components/llmconfig.ts +36 -9
- package/src/models/components/prompt.ts +3 -0
- package/src/models/components/promptcreate.ts +3 -0
- package/src/models/components/promptupdate.ts +3 -0
- package/src/models/components/target.ts +3 -0
- package/src/models/components/testmessage.ts +6 -0
- package/src/models/operations/channeltargetsupdate.ts +8 -6
- package/src/sdk/channels.ts +4 -1
- 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/models/components/provider.d.ts +0 -34
- package/models/components/provider.d.ts.map +0 -1
- package/models/components/provider.js +0 -54
- package/models/components/provider.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/models/components/provider.ts +0 -37
- package/src/sdk/v1.ts +0 -150
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import * as z from "zod";
|
|
5
6
|
import { SyllableSDKCore } from "../core.js";
|
|
6
7
|
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
7
8
|
import * as M from "../lib/matchers.js";
|
|
@@ -9,7 +10,6 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
9
10
|
import { RequestOptions } from "../lib/sdks.js";
|
|
10
11
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
12
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import * as components from "../models/components/index.js";
|
|
13
13
|
import {
|
|
14
14
|
ConnectionError,
|
|
15
15
|
InvalidRequestError,
|
|
@@ -25,6 +25,9 @@ import { Result } from "../types/fp.js";
|
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Delete Channel Target
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* Hard-delete a channel target by ID
|
|
28
31
|
*/
|
|
29
32
|
export async function channelsDelete(
|
|
30
33
|
client: SyllableSDKCore,
|
|
@@ -32,7 +35,7 @@ export async function channelsDelete(
|
|
|
32
35
|
options?: RequestOptions,
|
|
33
36
|
): Promise<
|
|
34
37
|
Result<
|
|
35
|
-
|
|
38
|
+
any,
|
|
36
39
|
| errors.HTTPValidationError
|
|
37
40
|
| SDKError
|
|
38
41
|
| SDKValidationError
|
|
@@ -120,7 +123,7 @@ export async function channelsDelete(
|
|
|
120
123
|
};
|
|
121
124
|
|
|
122
125
|
const [result] = await M.match<
|
|
123
|
-
|
|
126
|
+
any,
|
|
124
127
|
| errors.HTTPValidationError
|
|
125
128
|
| SDKError
|
|
126
129
|
| SDKValidationError
|
|
@@ -130,7 +133,7 @@ export async function channelsDelete(
|
|
|
130
133
|
| RequestTimeoutError
|
|
131
134
|
| ConnectionError
|
|
132
135
|
>(
|
|
133
|
-
M.json(200,
|
|
136
|
+
M.json(200, z.any()),
|
|
134
137
|
M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
|
|
135
138
|
M.fail(["4XX", "5XX"]),
|
|
136
139
|
)(response, { extraFields: responseFields });
|
|
@@ -56,7 +56,9 @@ export async function channelsTargetsUpdate(
|
|
|
56
56
|
return parsed;
|
|
57
57
|
}
|
|
58
58
|
const payload = parsed.value;
|
|
59
|
-
const body = encodeJSON("body", payload.
|
|
59
|
+
const body = encodeJSON("body", payload.ChannelTargetUpdateRequest, {
|
|
60
|
+
explode: true,
|
|
61
|
+
});
|
|
60
62
|
|
|
61
63
|
const pathParams = {
|
|
62
64
|
channel_id: encodeSimple("channel_id", payload.channel_id, {
|
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.
|
|
65
|
-
genVersion: "2.
|
|
64
|
+
sdkVersion: "0.1.0-alpha.27",
|
|
65
|
+
genVersion: "2.481.0",
|
|
66
66
|
userAgent:
|
|
67
|
-
"speakeasy-sdk/typescript 0.1.0-alpha.
|
|
67
|
+
"speakeasy-sdk/typescript 0.1.0-alpha.27 2.481.0 0.0.2 syllable-sdk",
|
|
68
68
|
} as const;
|
|
@@ -7,16 +7,28 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
DaoChannelTargetAgent,
|
|
12
|
+
DaoChannelTargetAgent$inboundSchema,
|
|
13
|
+
DaoChannelTargetAgent$Outbound,
|
|
14
|
+
DaoChannelTargetAgent$outboundSchema,
|
|
15
|
+
} from "./daochanneltargetagent.js";
|
|
10
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Class for all Channel Target responses
|
|
19
|
+
*/
|
|
11
20
|
export type ChannelTarget = {
|
|
12
21
|
id: number;
|
|
13
22
|
channelId: number | null;
|
|
14
23
|
channelName: string | null;
|
|
15
24
|
agentId: number | null;
|
|
25
|
+
agent: DaoChannelTargetAgent | null;
|
|
16
26
|
target: string | null;
|
|
17
27
|
targetMode: string | null;
|
|
18
28
|
fallbackTarget: string | null;
|
|
19
29
|
isTest: boolean | null;
|
|
30
|
+
updatedAt: Date | null;
|
|
31
|
+
lastUpdatedBy: string | null;
|
|
20
32
|
};
|
|
21
33
|
|
|
22
34
|
/** @internal */
|
|
@@ -29,10 +41,15 @@ export const ChannelTarget$inboundSchema: z.ZodType<
|
|
|
29
41
|
channel_id: z.nullable(z.number().int()),
|
|
30
42
|
channel_name: z.nullable(z.string()),
|
|
31
43
|
agent_id: z.nullable(z.number().int()),
|
|
44
|
+
agent: z.nullable(DaoChannelTargetAgent$inboundSchema),
|
|
32
45
|
target: z.nullable(z.string()),
|
|
33
46
|
target_mode: z.nullable(z.string()),
|
|
34
47
|
fallback_target: z.nullable(z.string()),
|
|
35
48
|
is_test: z.nullable(z.boolean()),
|
|
49
|
+
updated_at: z.nullable(
|
|
50
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
51
|
+
),
|
|
52
|
+
last_updated_by: z.nullable(z.string()),
|
|
36
53
|
}).transform((v) => {
|
|
37
54
|
return remap$(v, {
|
|
38
55
|
"channel_id": "channelId",
|
|
@@ -41,6 +58,8 @@ export const ChannelTarget$inboundSchema: z.ZodType<
|
|
|
41
58
|
"target_mode": "targetMode",
|
|
42
59
|
"fallback_target": "fallbackTarget",
|
|
43
60
|
"is_test": "isTest",
|
|
61
|
+
"updated_at": "updatedAt",
|
|
62
|
+
"last_updated_by": "lastUpdatedBy",
|
|
44
63
|
});
|
|
45
64
|
});
|
|
46
65
|
|
|
@@ -50,10 +69,13 @@ export type ChannelTarget$Outbound = {
|
|
|
50
69
|
channel_id: number | null;
|
|
51
70
|
channel_name: string | null;
|
|
52
71
|
agent_id: number | null;
|
|
72
|
+
agent: DaoChannelTargetAgent$Outbound | null;
|
|
53
73
|
target: string | null;
|
|
54
74
|
target_mode: string | null;
|
|
55
75
|
fallback_target: string | null;
|
|
56
76
|
is_test: boolean | null;
|
|
77
|
+
updated_at: string | null;
|
|
78
|
+
last_updated_by: string | null;
|
|
57
79
|
};
|
|
58
80
|
|
|
59
81
|
/** @internal */
|
|
@@ -66,10 +88,13 @@ export const ChannelTarget$outboundSchema: z.ZodType<
|
|
|
66
88
|
channelId: z.nullable(z.number().int()),
|
|
67
89
|
channelName: z.nullable(z.string()),
|
|
68
90
|
agentId: z.nullable(z.number().int()),
|
|
91
|
+
agent: z.nullable(DaoChannelTargetAgent$outboundSchema),
|
|
69
92
|
target: z.nullable(z.string()),
|
|
70
93
|
targetMode: z.nullable(z.string()),
|
|
71
94
|
fallbackTarget: z.nullable(z.string()),
|
|
72
95
|
isTest: z.nullable(z.boolean()),
|
|
96
|
+
updatedAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
97
|
+
lastUpdatedBy: z.nullable(z.string()),
|
|
73
98
|
}).transform((v) => {
|
|
74
99
|
return remap$(v, {
|
|
75
100
|
channelId: "channel_id",
|
|
@@ -78,6 +103,8 @@ export const ChannelTarget$outboundSchema: z.ZodType<
|
|
|
78
103
|
targetMode: "target_mode",
|
|
79
104
|
fallbackTarget: "fallback_target",
|
|
80
105
|
isTest: "is_test",
|
|
106
|
+
updatedAt: "updated_at",
|
|
107
|
+
lastUpdatedBy: "last_updated_by",
|
|
81
108
|
});
|
|
82
109
|
});
|
|
83
110
|
|
|
@@ -0,0 +1,107 @@
|
|
|
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 ChannelTargetUpdateRequest = {
|
|
12
|
+
id: number;
|
|
13
|
+
channelId: number | null;
|
|
14
|
+
agentId: number | null;
|
|
15
|
+
target: string | null;
|
|
16
|
+
targetMode: string | null;
|
|
17
|
+
fallbackTarget: string | null;
|
|
18
|
+
isTest: boolean | null;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const ChannelTargetUpdateRequest$inboundSchema: z.ZodType<
|
|
23
|
+
ChannelTargetUpdateRequest,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
id: z.number().int(),
|
|
28
|
+
channel_id: z.nullable(z.number().int()),
|
|
29
|
+
agent_id: z.nullable(z.number().int()),
|
|
30
|
+
target: z.nullable(z.string()),
|
|
31
|
+
target_mode: z.nullable(z.string()),
|
|
32
|
+
fallback_target: z.nullable(z.string()),
|
|
33
|
+
is_test: z.nullable(z.boolean()),
|
|
34
|
+
}).transform((v) => {
|
|
35
|
+
return remap$(v, {
|
|
36
|
+
"channel_id": "channelId",
|
|
37
|
+
"agent_id": "agentId",
|
|
38
|
+
"target_mode": "targetMode",
|
|
39
|
+
"fallback_target": "fallbackTarget",
|
|
40
|
+
"is_test": "isTest",
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export type ChannelTargetUpdateRequest$Outbound = {
|
|
46
|
+
id: number;
|
|
47
|
+
channel_id: number | null;
|
|
48
|
+
agent_id: number | null;
|
|
49
|
+
target: string | null;
|
|
50
|
+
target_mode: string | null;
|
|
51
|
+
fallback_target: string | null;
|
|
52
|
+
is_test: boolean | null;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/** @internal */
|
|
56
|
+
export const ChannelTargetUpdateRequest$outboundSchema: z.ZodType<
|
|
57
|
+
ChannelTargetUpdateRequest$Outbound,
|
|
58
|
+
z.ZodTypeDef,
|
|
59
|
+
ChannelTargetUpdateRequest
|
|
60
|
+
> = z.object({
|
|
61
|
+
id: z.number().int(),
|
|
62
|
+
channelId: z.nullable(z.number().int()),
|
|
63
|
+
agentId: z.nullable(z.number().int()),
|
|
64
|
+
target: z.nullable(z.string()),
|
|
65
|
+
targetMode: z.nullable(z.string()),
|
|
66
|
+
fallbackTarget: z.nullable(z.string()),
|
|
67
|
+
isTest: z.nullable(z.boolean()),
|
|
68
|
+
}).transform((v) => {
|
|
69
|
+
return remap$(v, {
|
|
70
|
+
channelId: "channel_id",
|
|
71
|
+
agentId: "agent_id",
|
|
72
|
+
targetMode: "target_mode",
|
|
73
|
+
fallbackTarget: "fallback_target",
|
|
74
|
+
isTest: "is_test",
|
|
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 ChannelTargetUpdateRequest$ {
|
|
83
|
+
/** @deprecated use `ChannelTargetUpdateRequest$inboundSchema` instead. */
|
|
84
|
+
export const inboundSchema = ChannelTargetUpdateRequest$inboundSchema;
|
|
85
|
+
/** @deprecated use `ChannelTargetUpdateRequest$outboundSchema` instead. */
|
|
86
|
+
export const outboundSchema = ChannelTargetUpdateRequest$outboundSchema;
|
|
87
|
+
/** @deprecated use `ChannelTargetUpdateRequest$Outbound` instead. */
|
|
88
|
+
export type Outbound = ChannelTargetUpdateRequest$Outbound;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function channelTargetUpdateRequestToJSON(
|
|
92
|
+
channelTargetUpdateRequest: ChannelTargetUpdateRequest,
|
|
93
|
+
): string {
|
|
94
|
+
return JSON.stringify(
|
|
95
|
+
ChannelTargetUpdateRequest$outboundSchema.parse(channelTargetUpdateRequest),
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function channelTargetUpdateRequestFromJSON(
|
|
100
|
+
jsonString: string,
|
|
101
|
+
): SafeParseResult<ChannelTargetUpdateRequest, SDKValidationError> {
|
|
102
|
+
return safeParse(
|
|
103
|
+
jsonString,
|
|
104
|
+
(x) => ChannelTargetUpdateRequest$inboundSchema.parse(JSON.parse(x)),
|
|
105
|
+
`Failed to parse 'ChannelTargetUpdateRequest' from JSON`,
|
|
106
|
+
);
|
|
107
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
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 DaoChannelTargetAgent = {
|
|
12
|
+
name: string;
|
|
13
|
+
description?: string | null | undefined;
|
|
14
|
+
label?: string | null | undefined;
|
|
15
|
+
type: string;
|
|
16
|
+
promptId: number;
|
|
17
|
+
customMessageId?: number | null | undefined;
|
|
18
|
+
timezone: string;
|
|
19
|
+
id: number;
|
|
20
|
+
updatedAt: Date;
|
|
21
|
+
lastUpdatedBy: string | null;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const DaoChannelTargetAgent$inboundSchema: z.ZodType<
|
|
26
|
+
DaoChannelTargetAgent,
|
|
27
|
+
z.ZodTypeDef,
|
|
28
|
+
unknown
|
|
29
|
+
> = z.object({
|
|
30
|
+
name: z.string(),
|
|
31
|
+
description: z.nullable(z.string()).optional(),
|
|
32
|
+
label: z.nullable(z.string()).optional(),
|
|
33
|
+
type: z.string(),
|
|
34
|
+
prompt_id: z.number().int(),
|
|
35
|
+
custom_message_id: z.nullable(z.number().int()).optional(),
|
|
36
|
+
timezone: z.string(),
|
|
37
|
+
id: z.number().int(),
|
|
38
|
+
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
39
|
+
last_updated_by: z.nullable(z.string()),
|
|
40
|
+
}).transform((v) => {
|
|
41
|
+
return remap$(v, {
|
|
42
|
+
"prompt_id": "promptId",
|
|
43
|
+
"custom_message_id": "customMessageId",
|
|
44
|
+
"updated_at": "updatedAt",
|
|
45
|
+
"last_updated_by": "lastUpdatedBy",
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export type DaoChannelTargetAgent$Outbound = {
|
|
51
|
+
name: string;
|
|
52
|
+
description?: string | null | undefined;
|
|
53
|
+
label?: string | null | undefined;
|
|
54
|
+
type: string;
|
|
55
|
+
prompt_id: number;
|
|
56
|
+
custom_message_id?: number | null | undefined;
|
|
57
|
+
timezone: string;
|
|
58
|
+
id: number;
|
|
59
|
+
updated_at: string;
|
|
60
|
+
last_updated_by: string | null;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export const DaoChannelTargetAgent$outboundSchema: z.ZodType<
|
|
65
|
+
DaoChannelTargetAgent$Outbound,
|
|
66
|
+
z.ZodTypeDef,
|
|
67
|
+
DaoChannelTargetAgent
|
|
68
|
+
> = z.object({
|
|
69
|
+
name: z.string(),
|
|
70
|
+
description: z.nullable(z.string()).optional(),
|
|
71
|
+
label: z.nullable(z.string()).optional(),
|
|
72
|
+
type: z.string(),
|
|
73
|
+
promptId: z.number().int(),
|
|
74
|
+
customMessageId: z.nullable(z.number().int()).optional(),
|
|
75
|
+
timezone: z.string(),
|
|
76
|
+
id: z.number().int(),
|
|
77
|
+
updatedAt: z.date().transform(v => v.toISOString()),
|
|
78
|
+
lastUpdatedBy: z.nullable(z.string()),
|
|
79
|
+
}).transform((v) => {
|
|
80
|
+
return remap$(v, {
|
|
81
|
+
promptId: "prompt_id",
|
|
82
|
+
customMessageId: "custom_message_id",
|
|
83
|
+
updatedAt: "updated_at",
|
|
84
|
+
lastUpdatedBy: "last_updated_by",
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* @internal
|
|
90
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
91
|
+
*/
|
|
92
|
+
export namespace DaoChannelTargetAgent$ {
|
|
93
|
+
/** @deprecated use `DaoChannelTargetAgent$inboundSchema` instead. */
|
|
94
|
+
export const inboundSchema = DaoChannelTargetAgent$inboundSchema;
|
|
95
|
+
/** @deprecated use `DaoChannelTargetAgent$outboundSchema` instead. */
|
|
96
|
+
export const outboundSchema = DaoChannelTargetAgent$outboundSchema;
|
|
97
|
+
/** @deprecated use `DaoChannelTargetAgent$Outbound` instead. */
|
|
98
|
+
export type Outbound = DaoChannelTargetAgent$Outbound;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function daoChannelTargetAgentToJSON(
|
|
102
|
+
daoChannelTargetAgent: DaoChannelTargetAgent,
|
|
103
|
+
): string {
|
|
104
|
+
return JSON.stringify(
|
|
105
|
+
DaoChannelTargetAgent$outboundSchema.parse(daoChannelTargetAgent),
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function daoChannelTargetAgentFromJSON(
|
|
110
|
+
jsonString: string,
|
|
111
|
+
): SafeParseResult<DaoChannelTargetAgent, SDKValidationError> {
|
|
112
|
+
return safeParse(
|
|
113
|
+
jsonString,
|
|
114
|
+
(x) => DaoChannelTargetAgent$inboundSchema.parse(JSON.parse(x)),
|
|
115
|
+
`Failed to parse 'DaoChannelTargetAgent' from JSON`,
|
|
116
|
+
);
|
|
117
|
+
}
|
|
@@ -20,6 +20,7 @@ export * from "./channelservices.js";
|
|
|
20
20
|
export * from "./channeltarget.js";
|
|
21
21
|
export * from "./channeltargetcreaterequest.js";
|
|
22
22
|
export * from "./channeltargetproperties.js";
|
|
23
|
+
export * from "./channeltargetupdaterequest.js";
|
|
23
24
|
export * from "./conversation.js";
|
|
24
25
|
export * from "./conversationproperties.js";
|
|
25
26
|
export * from "./custommessage.js";
|
|
@@ -27,6 +28,7 @@ export * from "./custommessagecreaterequest.js";
|
|
|
27
28
|
export * from "./custommessageproperties.js";
|
|
28
29
|
export * from "./custommessageresponse.js";
|
|
29
30
|
export * from "./custommessageupdaterequest.js";
|
|
31
|
+
export * from "./daochanneltargetagent.js";
|
|
30
32
|
export * from "./daocustommessagerule.js";
|
|
31
33
|
export * from "./dayofweek.js";
|
|
32
34
|
export * from "./directoryextension.js";
|
|
@@ -55,7 +57,6 @@ export * from "./promptcreate.js";
|
|
|
55
57
|
export * from "./prompthistory.js";
|
|
56
58
|
export * from "./promptproperties.js";
|
|
57
59
|
export * from "./promptupdate.js";
|
|
58
|
-
export * from "./provider.js";
|
|
59
60
|
export * from "./security.js";
|
|
60
61
|
export * from "./service.js";
|
|
61
62
|
export * from "./servicecreate.js";
|
|
@@ -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(),
|
|
@@ -22,6 +22,7 @@ export type TestMessage = {
|
|
|
22
22
|
agentId: string;
|
|
23
23
|
orgName: string;
|
|
24
24
|
overrideTimestamp?: string | null | undefined;
|
|
25
|
+
sessionStart?: boolean | undefined;
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
/** @internal */
|
|
@@ -37,6 +38,7 @@ export const TestMessage$inboundSchema: z.ZodType<
|
|
|
37
38
|
agent_id: z.string(),
|
|
38
39
|
org_name: z.string(),
|
|
39
40
|
override_timestamp: z.nullable(z.string()).optional(),
|
|
41
|
+
session_start: z.boolean().default(false),
|
|
40
42
|
}).transform((v) => {
|
|
41
43
|
return remap$(v, {
|
|
42
44
|
"service_name": "serviceName",
|
|
@@ -44,6 +46,7 @@ export const TestMessage$inboundSchema: z.ZodType<
|
|
|
44
46
|
"agent_id": "agentId",
|
|
45
47
|
"org_name": "orgName",
|
|
46
48
|
"override_timestamp": "overrideTimestamp",
|
|
49
|
+
"session_start": "sessionStart",
|
|
47
50
|
});
|
|
48
51
|
});
|
|
49
52
|
|
|
@@ -56,6 +59,7 @@ export type TestMessage$Outbound = {
|
|
|
56
59
|
agent_id: string;
|
|
57
60
|
org_name: string;
|
|
58
61
|
override_timestamp?: string | null | undefined;
|
|
62
|
+
session_start: boolean;
|
|
59
63
|
};
|
|
60
64
|
|
|
61
65
|
/** @internal */
|
|
@@ -71,6 +75,7 @@ export const TestMessage$outboundSchema: z.ZodType<
|
|
|
71
75
|
agentId: z.string(),
|
|
72
76
|
orgName: z.string(),
|
|
73
77
|
overrideTimestamp: z.nullable(z.string()).optional(),
|
|
78
|
+
sessionStart: z.boolean().default(false),
|
|
74
79
|
}).transform((v) => {
|
|
75
80
|
return remap$(v, {
|
|
76
81
|
serviceName: "service_name",
|
|
@@ -78,6 +83,7 @@ export const TestMessage$outboundSchema: z.ZodType<
|
|
|
78
83
|
agentId: "agent_id",
|
|
79
84
|
orgName: "org_name",
|
|
80
85
|
overrideTimestamp: "override_timestamp",
|
|
86
|
+
sessionStart: "session_start",
|
|
81
87
|
});
|
|
82
88
|
});
|
|
83
89
|
|
|
@@ -12,7 +12,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
12
12
|
export type ChannelTargetsUpdateRequest = {
|
|
13
13
|
channelId: number;
|
|
14
14
|
targetId: number;
|
|
15
|
-
|
|
15
|
+
channelTargetUpdateRequest: components.ChannelTargetUpdateRequest;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
/** @internal */
|
|
@@ -23,12 +23,13 @@ export const ChannelTargetsUpdateRequest$inboundSchema: z.ZodType<
|
|
|
23
23
|
> = z.object({
|
|
24
24
|
channel_id: z.number().int(),
|
|
25
25
|
target_id: z.number().int(),
|
|
26
|
-
|
|
26
|
+
ChannelTargetUpdateRequest:
|
|
27
|
+
components.ChannelTargetUpdateRequest$inboundSchema,
|
|
27
28
|
}).transform((v) => {
|
|
28
29
|
return remap$(v, {
|
|
29
30
|
"channel_id": "channelId",
|
|
30
31
|
"target_id": "targetId",
|
|
31
|
-
"
|
|
32
|
+
"ChannelTargetUpdateRequest": "channelTargetUpdateRequest",
|
|
32
33
|
});
|
|
33
34
|
});
|
|
34
35
|
|
|
@@ -36,7 +37,7 @@ export const ChannelTargetsUpdateRequest$inboundSchema: z.ZodType<
|
|
|
36
37
|
export type ChannelTargetsUpdateRequest$Outbound = {
|
|
37
38
|
channel_id: number;
|
|
38
39
|
target_id: number;
|
|
39
|
-
|
|
40
|
+
ChannelTargetUpdateRequest: components.ChannelTargetUpdateRequest$Outbound;
|
|
40
41
|
};
|
|
41
42
|
|
|
42
43
|
/** @internal */
|
|
@@ -47,12 +48,13 @@ export const ChannelTargetsUpdateRequest$outboundSchema: z.ZodType<
|
|
|
47
48
|
> = z.object({
|
|
48
49
|
channelId: z.number().int(),
|
|
49
50
|
targetId: z.number().int(),
|
|
50
|
-
|
|
51
|
+
channelTargetUpdateRequest:
|
|
52
|
+
components.ChannelTargetUpdateRequest$outboundSchema,
|
|
51
53
|
}).transform((v) => {
|
|
52
54
|
return remap$(v, {
|
|
53
55
|
channelId: "channel_id",
|
|
54
56
|
targetId: "target_id",
|
|
55
|
-
|
|
57
|
+
channelTargetUpdateRequest: "ChannelTargetUpdateRequest",
|
|
56
58
|
});
|
|
57
59
|
});
|
|
58
60
|
|
package/src/sdk/channels.ts
CHANGED
|
@@ -32,11 +32,14 @@ export class Channels extends ClientSDK {
|
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* Delete Channel Target
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
* Hard-delete a channel target by ID
|
|
35
38
|
*/
|
|
36
39
|
async delete(
|
|
37
40
|
request: operations.ChannelTargetsDeleteRequest,
|
|
38
41
|
options?: RequestOptions,
|
|
39
|
-
): Promise<
|
|
42
|
+
): Promise<any> {
|
|
40
43
|
return unwrapAsync(channelsDelete(
|
|
41
44
|
this,
|
|
42
45
|
request,
|