syllable-sdk 1.0.12-rc.3 → 1.0.12-rc.4
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/bin/mcp-server.js +36 -5
- package/bin/mcp-server.js.map +11 -10
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/components/custommessageconfig.d.ts +23 -0
- package/models/components/custommessageconfig.d.ts.map +1 -0
- package/models/components/custommessageconfig.js +67 -0
- package/models/components/custommessageconfig.js.map +1 -0
- package/models/components/custommessagecreaterequest.d.ts +6 -0
- package/models/components/custommessagecreaterequest.d.ts.map +1 -1
- package/models/components/custommessagecreaterequest.js +3 -0
- package/models/components/custommessagecreaterequest.js.map +1 -1
- package/models/components/custommessageresponse.d.ts +6 -0
- package/models/components/custommessageresponse.d.ts.map +1 -1
- package/models/components/custommessageresponse.js +3 -0
- package/models/components/custommessageresponse.js.map +1 -1
- package/models/components/custommessageupdaterequest.d.ts +6 -0
- package/models/components/custommessageupdaterequest.d.ts.map +1 -1
- package/models/components/custommessageupdaterequest.js +3 -0
- package/models/components/custommessageupdaterequest.js.map +1 -1
- package/models/components/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.js.map +1 -1
- package/openapi.json +52 -0
- package/package.json +1 -1
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/custommessageconfig.ts +68 -0
- package/src/models/components/custommessagecreaterequest.ts +13 -0
- package/src/models/components/custommessageresponse.ts +13 -0
- package/src/models/components/custommessageupdaterequest.ts +13 -0
- package/src/models/components/index.ts +1 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Additional configuration options for the message.
|
|
13
|
+
*/
|
|
14
|
+
export type CustomMessageConfig = {
|
|
15
|
+
/**
|
|
16
|
+
* The behavior of an agent assigned this message at the beginning of a user-initiated non-voice session (e.g., SMS, email, etc.). 'respond_only' will skip the message and respond to the user's message. 'greet_and_respond' will deliver the message and respond to the user's message. 'greet_only' will deliver the message and not respond to the user's message. Defaults to 'greet_only'.
|
|
17
|
+
*/
|
|
18
|
+
userInitiatedNonVoiceSessionBehavior?: string | undefined;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const CustomMessageConfig$inboundSchema: z.ZodType<
|
|
23
|
+
CustomMessageConfig,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
user_initiated_non_voice_session_behavior: z.string().default("greet_only"),
|
|
28
|
+
}).transform((v) => {
|
|
29
|
+
return remap$(v, {
|
|
30
|
+
"user_initiated_non_voice_session_behavior":
|
|
31
|
+
"userInitiatedNonVoiceSessionBehavior",
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
/** @internal */
|
|
35
|
+
export type CustomMessageConfig$Outbound = {
|
|
36
|
+
user_initiated_non_voice_session_behavior: string;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const CustomMessageConfig$outboundSchema: z.ZodType<
|
|
41
|
+
CustomMessageConfig$Outbound,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
CustomMessageConfig
|
|
44
|
+
> = z.object({
|
|
45
|
+
userInitiatedNonVoiceSessionBehavior: z.string().default("greet_only"),
|
|
46
|
+
}).transform((v) => {
|
|
47
|
+
return remap$(v, {
|
|
48
|
+
userInitiatedNonVoiceSessionBehavior:
|
|
49
|
+
"user_initiated_non_voice_session_behavior",
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
export function customMessageConfigToJSON(
|
|
54
|
+
customMessageConfig: CustomMessageConfig,
|
|
55
|
+
): string {
|
|
56
|
+
return JSON.stringify(
|
|
57
|
+
CustomMessageConfig$outboundSchema.parse(customMessageConfig),
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
export function customMessageConfigFromJSON(
|
|
61
|
+
jsonString: string,
|
|
62
|
+
): SafeParseResult<CustomMessageConfig, SDKValidationError> {
|
|
63
|
+
return safeParse(
|
|
64
|
+
jsonString,
|
|
65
|
+
(x) => CustomMessageConfig$inboundSchema.parse(JSON.parse(x)),
|
|
66
|
+
`Failed to parse 'CustomMessageConfig' from JSON`,
|
|
67
|
+
);
|
|
68
|
+
}
|
|
@@ -6,6 +6,12 @@ import * as z from "zod/v3";
|
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
CustomMessageConfig,
|
|
11
|
+
CustomMessageConfig$inboundSchema,
|
|
12
|
+
CustomMessageConfig$Outbound,
|
|
13
|
+
CustomMessageConfig$outboundSchema,
|
|
14
|
+
} from "./custommessageconfig.js";
|
|
9
15
|
import {
|
|
10
16
|
CustomMessageRule,
|
|
11
17
|
CustomMessageRule$inboundSchema,
|
|
@@ -33,6 +39,10 @@ export type CustomMessageCreateRequest = {
|
|
|
33
39
|
* Rules for time-specific message variants
|
|
34
40
|
*/
|
|
35
41
|
rules?: Array<CustomMessageRule> | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Additional configuration options for the message.
|
|
44
|
+
*/
|
|
45
|
+
config?: CustomMessageConfig | undefined;
|
|
36
46
|
/**
|
|
37
47
|
* Type of the custom message (must be "greeting" for now)
|
|
38
48
|
*/
|
|
@@ -49,6 +59,7 @@ export const CustomMessageCreateRequest$inboundSchema: z.ZodType<
|
|
|
49
59
|
text: z.string(),
|
|
50
60
|
label: z.nullable(z.string()).optional(),
|
|
51
61
|
rules: z.array(CustomMessageRule$inboundSchema).optional(),
|
|
62
|
+
config: CustomMessageConfig$inboundSchema.optional(),
|
|
52
63
|
type: z.string().default("greeting"),
|
|
53
64
|
});
|
|
54
65
|
/** @internal */
|
|
@@ -57,6 +68,7 @@ export type CustomMessageCreateRequest$Outbound = {
|
|
|
57
68
|
text: string;
|
|
58
69
|
label?: string | null | undefined;
|
|
59
70
|
rules?: Array<CustomMessageRule$Outbound> | undefined;
|
|
71
|
+
config?: CustomMessageConfig$Outbound | undefined;
|
|
60
72
|
type: string;
|
|
61
73
|
};
|
|
62
74
|
|
|
@@ -70,6 +82,7 @@ export const CustomMessageCreateRequest$outboundSchema: z.ZodType<
|
|
|
70
82
|
text: z.string(),
|
|
71
83
|
label: z.nullable(z.string()).optional(),
|
|
72
84
|
rules: z.array(CustomMessageRule$outboundSchema).optional(),
|
|
85
|
+
config: CustomMessageConfig$outboundSchema.optional(),
|
|
73
86
|
type: z.string().default("greeting"),
|
|
74
87
|
});
|
|
75
88
|
|
|
@@ -7,6 +7,12 @@ 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
|
+
CustomMessageConfig,
|
|
12
|
+
CustomMessageConfig$inboundSchema,
|
|
13
|
+
CustomMessageConfig$Outbound,
|
|
14
|
+
CustomMessageConfig$outboundSchema,
|
|
15
|
+
} from "./custommessageconfig.js";
|
|
10
16
|
import {
|
|
11
17
|
CustomMessageRule,
|
|
12
18
|
CustomMessageRule$inboundSchema,
|
|
@@ -41,6 +47,10 @@ export type CustomMessageResponse = {
|
|
|
41
47
|
* Rules for time-specific message variants
|
|
42
48
|
*/
|
|
43
49
|
rules?: Array<CustomMessageRule> | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Additional configuration options for the message.
|
|
52
|
+
*/
|
|
53
|
+
config?: CustomMessageConfig | undefined;
|
|
44
54
|
/**
|
|
45
55
|
* The ID of the custom message
|
|
46
56
|
*/
|
|
@@ -73,6 +83,7 @@ export const CustomMessageResponse$inboundSchema: z.ZodType<
|
|
|
73
83
|
text: z.string(),
|
|
74
84
|
label: z.nullable(z.string()).optional(),
|
|
75
85
|
rules: z.array(CustomMessageRule$inboundSchema).optional(),
|
|
86
|
+
config: CustomMessageConfig$inboundSchema.optional(),
|
|
76
87
|
id: z.number().int(),
|
|
77
88
|
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
78
89
|
agent_count: z.nullable(z.number().int()).optional(),
|
|
@@ -91,6 +102,7 @@ export type CustomMessageResponse$Outbound = {
|
|
|
91
102
|
text: string;
|
|
92
103
|
label?: string | null | undefined;
|
|
93
104
|
rules?: Array<CustomMessageRule$Outbound> | undefined;
|
|
105
|
+
config?: CustomMessageConfig$Outbound | undefined;
|
|
94
106
|
id: number;
|
|
95
107
|
updated_at: string;
|
|
96
108
|
agent_count?: number | null | undefined;
|
|
@@ -108,6 +120,7 @@ export const CustomMessageResponse$outboundSchema: z.ZodType<
|
|
|
108
120
|
text: z.string(),
|
|
109
121
|
label: z.nullable(z.string()).optional(),
|
|
110
122
|
rules: z.array(CustomMessageRule$outboundSchema).optional(),
|
|
123
|
+
config: CustomMessageConfig$outboundSchema.optional(),
|
|
111
124
|
id: z.number().int(),
|
|
112
125
|
updatedAt: z.date().transform(v => v.toISOString()),
|
|
113
126
|
agentCount: z.nullable(z.number().int()).optional(),
|
|
@@ -6,6 +6,12 @@ import * as z from "zod/v3";
|
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
CustomMessageConfig,
|
|
11
|
+
CustomMessageConfig$inboundSchema,
|
|
12
|
+
CustomMessageConfig$Outbound,
|
|
13
|
+
CustomMessageConfig$outboundSchema,
|
|
14
|
+
} from "./custommessageconfig.js";
|
|
9
15
|
import {
|
|
10
16
|
CustomMessageRule,
|
|
11
17
|
CustomMessageRule$inboundSchema,
|
|
@@ -33,6 +39,10 @@ export type CustomMessageUpdateRequest = {
|
|
|
33
39
|
* Rules for time-specific message variants
|
|
34
40
|
*/
|
|
35
41
|
rules?: Array<CustomMessageRule> | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Additional configuration options for the message.
|
|
44
|
+
*/
|
|
45
|
+
config?: CustomMessageConfig | undefined;
|
|
36
46
|
/**
|
|
37
47
|
* The ID of the custom message
|
|
38
48
|
*/
|
|
@@ -53,6 +63,7 @@ export const CustomMessageUpdateRequest$inboundSchema: z.ZodType<
|
|
|
53
63
|
text: z.string(),
|
|
54
64
|
label: z.nullable(z.string()).optional(),
|
|
55
65
|
rules: z.array(CustomMessageRule$inboundSchema).optional(),
|
|
66
|
+
config: CustomMessageConfig$inboundSchema.optional(),
|
|
56
67
|
id: z.number().int(),
|
|
57
68
|
type: z.string().default("greeting"),
|
|
58
69
|
});
|
|
@@ -62,6 +73,7 @@ export type CustomMessageUpdateRequest$Outbound = {
|
|
|
62
73
|
text: string;
|
|
63
74
|
label?: string | null | undefined;
|
|
64
75
|
rules?: Array<CustomMessageRule$Outbound> | undefined;
|
|
76
|
+
config?: CustomMessageConfig$Outbound | undefined;
|
|
65
77
|
id: number;
|
|
66
78
|
type: string;
|
|
67
79
|
};
|
|
@@ -76,6 +88,7 @@ export const CustomMessageUpdateRequest$outboundSchema: z.ZodType<
|
|
|
76
88
|
text: z.string(),
|
|
77
89
|
label: z.nullable(z.string()).optional(),
|
|
78
90
|
rules: z.array(CustomMessageRule$outboundSchema).optional(),
|
|
91
|
+
config: CustomMessageConfig$outboundSchema.optional(),
|
|
79
92
|
id: z.number().int(),
|
|
80
93
|
type: z.string().default("greeting"),
|
|
81
94
|
});
|
|
@@ -46,6 +46,7 @@ export * from "./communicationrequestresult.js";
|
|
|
46
46
|
export * from "./conversation.js";
|
|
47
47
|
export * from "./conversationproperties.js";
|
|
48
48
|
export * from "./createtakeoutresponse.js";
|
|
49
|
+
export * from "./custommessageconfig.js";
|
|
49
50
|
export * from "./custommessagecreaterequest.js";
|
|
50
51
|
export * from "./custommessageproperties.js";
|
|
51
52
|
export * from "./custommessageresponse.js";
|