syllable-sdk 1.0.13-rc.2 → 1.0.13-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.
Files changed (67) hide show
  1. package/bin/mcp-server.js +866 -832
  2. package/bin/mcp-server.js.map +13 -12
  3. package/examples/package-lock.json +1 -1
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +3 -3
  6. package/lib/config.js +3 -3
  7. package/mcp-server/mcp-server.js +1 -1
  8. package/mcp-server/server.js +1 -1
  9. package/models/components/context.d.ts +36 -0
  10. package/models/components/context.d.ts.map +1 -0
  11. package/models/components/context.js +72 -0
  12. package/models/components/context.js.map +1 -0
  13. package/models/components/contexttask.d.ts +32 -0
  14. package/models/components/contexttask.d.ts.map +1 -0
  15. package/models/components/{custommessageconfig.js → contexttask.js} +22 -20
  16. package/models/components/contexttask.js.map +1 -0
  17. package/models/components/custommessagecreaterequest.d.ts +0 -6
  18. package/models/components/custommessagecreaterequest.d.ts.map +1 -1
  19. package/models/components/custommessagecreaterequest.js +0 -3
  20. package/models/components/custommessagecreaterequest.js.map +1 -1
  21. package/models/components/custommessageresponse.d.ts +0 -6
  22. package/models/components/custommessageresponse.d.ts.map +1 -1
  23. package/models/components/custommessageresponse.js +0 -3
  24. package/models/components/custommessageresponse.js.map +1 -1
  25. package/models/components/custommessageupdaterequest.d.ts +0 -6
  26. package/models/components/custommessageupdaterequest.d.ts.map +1 -1
  27. package/models/components/custommessageupdaterequest.js +0 -3
  28. package/models/components/custommessageupdaterequest.js.map +1 -1
  29. package/models/components/index.d.ts +2 -1
  30. package/models/components/index.d.ts.map +1 -1
  31. package/models/components/index.js +2 -1
  32. package/models/components/index.js.map +1 -1
  33. package/models/components/tooldefinition.d.ts +6 -0
  34. package/models/components/tooldefinition.d.ts.map +1 -1
  35. package/models/components/tooldefinition.js +3 -0
  36. package/models/components/tooldefinition.js.map +1 -1
  37. package/openapi.json +101 -85
  38. package/package.json +1 -1
  39. package/src/lib/config.ts +3 -3
  40. package/src/mcp-server/mcp-server.ts +1 -1
  41. package/src/mcp-server/server.ts +1 -1
  42. package/src/models/components/context.ts +88 -0
  43. package/src/models/components/contexttask.ts +78 -0
  44. package/src/models/components/custommessagecreaterequest.ts +0 -13
  45. package/src/models/components/custommessageresponse.ts +0 -13
  46. package/src/models/components/custommessageupdaterequest.ts +0 -13
  47. package/src/models/components/index.ts +2 -1
  48. package/src/models/components/tooldefinition.ts +13 -0
  49. package/src/types/enums.ts +1 -21
  50. package/src/types/index.ts +2 -1
  51. package/src/types/unrecognized.ts +27 -0
  52. package/types/enums.d.ts +1 -8
  53. package/types/enums.d.ts.map +1 -1
  54. package/types/enums.js +3 -21
  55. package/types/enums.js.map +1 -1
  56. package/types/index.d.ts +2 -1
  57. package/types/index.d.ts.map +1 -1
  58. package/types/index.js +15 -0
  59. package/types/index.js.map +1 -1
  60. package/types/unrecognized.d.ts +10 -0
  61. package/types/unrecognized.d.ts.map +1 -0
  62. package/types/unrecognized.js +26 -0
  63. package/types/unrecognized.js.map +1 -0
  64. package/models/components/custommessageconfig.d.ts +0 -23
  65. package/models/components/custommessageconfig.d.ts.map +0 -1
  66. package/models/components/custommessageconfig.js.map +0 -1
  67. package/src/models/components/custommessageconfig.ts +0 -68
@@ -0,0 +1,78 @@
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 {
8
+ collectExtraKeys as collectExtraKeys$,
9
+ safeParse,
10
+ } from "../../lib/schemas.js";
11
+ import { Result as SafeParseResult } from "../../types/fp.js";
12
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
13
+
14
+ /**
15
+ * Metadata describing a context task driven by a tool call.
16
+ */
17
+ export type ContextTask = {
18
+ /**
19
+ * The type of the task.
20
+ */
21
+ type?: string | null | undefined;
22
+ /**
23
+ * A unique identifier for the task.
24
+ */
25
+ id?: string | null | undefined;
26
+ additionalProperties?: { [k: string]: any } | undefined;
27
+ };
28
+
29
+ /** @internal */
30
+ export const ContextTask$inboundSchema: z.ZodType<
31
+ ContextTask,
32
+ z.ZodTypeDef,
33
+ unknown
34
+ > = collectExtraKeys$(
35
+ z.object({
36
+ type: z.nullable(z.string()).optional(),
37
+ id: z.nullable(z.string()).optional(),
38
+ }).catchall(z.any()),
39
+ "additionalProperties",
40
+ true,
41
+ );
42
+ /** @internal */
43
+ export type ContextTask$Outbound = {
44
+ type?: string | null | undefined;
45
+ id?: string | null | undefined;
46
+ [additionalProperties: string]: unknown;
47
+ };
48
+
49
+ /** @internal */
50
+ export const ContextTask$outboundSchema: z.ZodType<
51
+ ContextTask$Outbound,
52
+ z.ZodTypeDef,
53
+ ContextTask
54
+ > = z.object({
55
+ type: z.nullable(z.string()).optional(),
56
+ id: z.nullable(z.string()).optional(),
57
+ additionalProperties: z.record(z.any()).optional(),
58
+ }).transform((v) => {
59
+ return {
60
+ ...v.additionalProperties,
61
+ ...remap$(v, {
62
+ additionalProperties: null,
63
+ }),
64
+ };
65
+ });
66
+
67
+ export function contextTaskToJSON(contextTask: ContextTask): string {
68
+ return JSON.stringify(ContextTask$outboundSchema.parse(contextTask));
69
+ }
70
+ export function contextTaskFromJSON(
71
+ jsonString: string,
72
+ ): SafeParseResult<ContextTask, SDKValidationError> {
73
+ return safeParse(
74
+ jsonString,
75
+ (x) => ContextTask$inboundSchema.parse(JSON.parse(x)),
76
+ `Failed to parse 'ContextTask' from JSON`,
77
+ );
78
+ }
@@ -6,12 +6,6 @@ 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";
15
9
  import {
16
10
  CustomMessageRule,
17
11
  CustomMessageRule$inboundSchema,
@@ -39,10 +33,6 @@ export type CustomMessageCreateRequest = {
39
33
  * Rules for time-specific message variants
40
34
  */
41
35
  rules?: Array<CustomMessageRule> | undefined;
42
- /**
43
- * Additional configuration options for the message.
44
- */
45
- config?: CustomMessageConfig | undefined;
46
36
  /**
47
37
  * Type of the custom message (must be "greeting" for now)
48
38
  */
@@ -59,7 +49,6 @@ export const CustomMessageCreateRequest$inboundSchema: z.ZodType<
59
49
  text: z.string(),
60
50
  label: z.nullable(z.string()).optional(),
61
51
  rules: z.array(CustomMessageRule$inboundSchema).optional(),
62
- config: CustomMessageConfig$inboundSchema.optional(),
63
52
  type: z.string().default("greeting"),
64
53
  });
65
54
  /** @internal */
@@ -68,7 +57,6 @@ export type CustomMessageCreateRequest$Outbound = {
68
57
  text: string;
69
58
  label?: string | null | undefined;
70
59
  rules?: Array<CustomMessageRule$Outbound> | undefined;
71
- config?: CustomMessageConfig$Outbound | undefined;
72
60
  type: string;
73
61
  };
74
62
 
@@ -82,7 +70,6 @@ export const CustomMessageCreateRequest$outboundSchema: z.ZodType<
82
70
  text: z.string(),
83
71
  label: z.nullable(z.string()).optional(),
84
72
  rules: z.array(CustomMessageRule$outboundSchema).optional(),
85
- config: CustomMessageConfig$outboundSchema.optional(),
86
73
  type: z.string().default("greeting"),
87
74
  });
88
75
 
@@ -7,12 +7,6 @@ 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";
16
10
  import {
17
11
  CustomMessageRule,
18
12
  CustomMessageRule$inboundSchema,
@@ -47,10 +41,6 @@ export type CustomMessageResponse = {
47
41
  * Rules for time-specific message variants
48
42
  */
49
43
  rules?: Array<CustomMessageRule> | undefined;
50
- /**
51
- * Additional configuration options for the message.
52
- */
53
- config?: CustomMessageConfig | undefined;
54
44
  /**
55
45
  * The ID of the custom message
56
46
  */
@@ -83,7 +73,6 @@ export const CustomMessageResponse$inboundSchema: z.ZodType<
83
73
  text: z.string(),
84
74
  label: z.nullable(z.string()).optional(),
85
75
  rules: z.array(CustomMessageRule$inboundSchema).optional(),
86
- config: CustomMessageConfig$inboundSchema.optional(),
87
76
  id: z.number().int(),
88
77
  updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
89
78
  agent_count: z.nullable(z.number().int()).optional(),
@@ -102,7 +91,6 @@ export type CustomMessageResponse$Outbound = {
102
91
  text: string;
103
92
  label?: string | null | undefined;
104
93
  rules?: Array<CustomMessageRule$Outbound> | undefined;
105
- config?: CustomMessageConfig$Outbound | undefined;
106
94
  id: number;
107
95
  updated_at: string;
108
96
  agent_count?: number | null | undefined;
@@ -120,7 +108,6 @@ export const CustomMessageResponse$outboundSchema: z.ZodType<
120
108
  text: z.string(),
121
109
  label: z.nullable(z.string()).optional(),
122
110
  rules: z.array(CustomMessageRule$outboundSchema).optional(),
123
- config: CustomMessageConfig$outboundSchema.optional(),
124
111
  id: z.number().int(),
125
112
  updatedAt: z.date().transform(v => v.toISOString()),
126
113
  agentCount: z.nullable(z.number().int()).optional(),
@@ -6,12 +6,6 @@ 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";
15
9
  import {
16
10
  CustomMessageRule,
17
11
  CustomMessageRule$inboundSchema,
@@ -39,10 +33,6 @@ export type CustomMessageUpdateRequest = {
39
33
  * Rules for time-specific message variants
40
34
  */
41
35
  rules?: Array<CustomMessageRule> | undefined;
42
- /**
43
- * Additional configuration options for the message.
44
- */
45
- config?: CustomMessageConfig | undefined;
46
36
  /**
47
37
  * The ID of the custom message
48
38
  */
@@ -63,7 +53,6 @@ export const CustomMessageUpdateRequest$inboundSchema: z.ZodType<
63
53
  text: z.string(),
64
54
  label: z.nullable(z.string()).optional(),
65
55
  rules: z.array(CustomMessageRule$inboundSchema).optional(),
66
- config: CustomMessageConfig$inboundSchema.optional(),
67
56
  id: z.number().int(),
68
57
  type: z.string().default("greeting"),
69
58
  });
@@ -73,7 +62,6 @@ export type CustomMessageUpdateRequest$Outbound = {
73
62
  text: string;
74
63
  label?: string | null | undefined;
75
64
  rules?: Array<CustomMessageRule$Outbound> | undefined;
76
- config?: CustomMessageConfig$Outbound | undefined;
77
65
  id: number;
78
66
  type: string;
79
67
  };
@@ -88,7 +76,6 @@ export const CustomMessageUpdateRequest$outboundSchema: z.ZodType<
88
76
  text: z.string(),
89
77
  label: z.nullable(z.string()).optional(),
90
78
  rules: z.array(CustomMessageRule$outboundSchema).optional(),
91
- config: CustomMessageConfig$outboundSchema.optional(),
92
79
  id: z.number().int(),
93
80
  type: z.string().default("greeting"),
94
81
  });
@@ -43,10 +43,11 @@ export * from "./communicationbatchinput.js";
43
43
  export * from "./communicationbatchupdate.js";
44
44
  export * from "./communicationrequest.js";
45
45
  export * from "./communicationrequestresult.js";
46
+ export * from "./context.js";
47
+ export * from "./contexttask.js";
46
48
  export * from "./conversation.js";
47
49
  export * from "./conversationproperties.js";
48
50
  export * from "./createtakeoutresponse.js";
49
- export * from "./custommessageconfig.js";
50
51
  export * from "./custommessagecreaterequest.js";
51
52
  export * from "./custommessageproperties.js";
52
53
  export * from "./custommessageresponse.js";
@@ -8,6 +8,12 @@ import { safeParse } from "../../lib/schemas.js";
8
8
  import { ClosedEnum } from "../../types/enums.js";
9
9
  import { Result as SafeParseResult } from "../../types/fp.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+ import {
12
+ Context,
13
+ Context$inboundSchema,
14
+ Context$Outbound,
15
+ Context$outboundSchema,
16
+ } from "./context.js";
11
17
  import {
12
18
  InternalTool,
13
19
  InternalTool$inboundSchema,
@@ -68,6 +74,10 @@ export type ToolDefinition = {
68
74
  * The configuration for an HTTP API call.
69
75
  */
70
76
  endpoint?: ToolHttpEndpoint | null | undefined;
77
+ /**
78
+ * The configuration for a context tool.
79
+ */
80
+ context?: Context | null | undefined;
71
81
  /**
72
82
  * The default values for the parameters of the function/tool call.
73
83
  */
@@ -134,6 +144,7 @@ export const ToolDefinition$inboundSchema: z.ZodType<
134
144
  type: z.nullable(Type$inboundSchema).optional(),
135
145
  tool: InternalTool$inboundSchema,
136
146
  endpoint: z.nullable(ToolHttpEndpoint$inboundSchema).optional(),
147
+ context: z.nullable(Context$inboundSchema).optional(),
137
148
  defaults: z.nullable(
138
149
  z.union([z.any(), z.record(ToolParameterDefault$inboundSchema)]),
139
150
  ).optional(),
@@ -151,6 +162,7 @@ export type ToolDefinition$Outbound = {
151
162
  type?: string | null | undefined;
152
163
  tool: InternalTool$Outbound;
153
164
  endpoint?: ToolHttpEndpoint$Outbound | null | undefined;
165
+ context?: Context$Outbound | null | undefined;
154
166
  defaults?:
155
167
  | any
156
168
  | { [k: string]: ToolParameterDefault$Outbound }
@@ -170,6 +182,7 @@ export const ToolDefinition$outboundSchema: z.ZodType<
170
182
  type: z.nullable(Type$outboundSchema).optional(),
171
183
  tool: InternalTool$outboundSchema,
172
184
  endpoint: z.nullable(ToolHttpEndpoint$outboundSchema).optional(),
185
+ context: z.nullable(Context$outboundSchema).optional(),
173
186
  defaults: z.nullable(
174
187
  z.union([z.any(), z.record(ToolParameterDefault$outboundSchema)]),
175
188
  ).optional(),
@@ -3,34 +3,14 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod/v3";
6
+ import { Unrecognized, unrecognized } from "./unrecognized.js";
6
7
 
7
- declare const __brand: unique symbol;
8
- export type Unrecognized<T> = T & { [__brand]: "unrecognized" };
9
8
  export type ClosedEnum<T extends Readonly<Record<string, string | number>>> =
10
9
  T[keyof T];
11
10
  export type OpenEnum<T extends Readonly<Record<string, string | number>>> =
12
11
  | T[keyof T]
13
12
  | Unrecognized<T[keyof T] extends number ? number : string>;
14
13
 
15
- function unrecognized<T>(value: T): Unrecognized<T> {
16
- unrecognizedCount++;
17
- return value as Unrecognized<T>;
18
- }
19
-
20
- let unrecognizedCount = 0;
21
- let refCount = 0;
22
- export function unrecognizedCounter() {
23
- refCount++;
24
- const start = unrecognizedCount;
25
- return {
26
- count: () => {
27
- const count = unrecognizedCount - start;
28
- if (--refCount === 0) unrecognizedCount = 0;
29
- return count;
30
- },
31
- };
32
- }
33
-
34
14
  export function inboundSchema<T extends Record<string, string>>(
35
15
  enumObj: T,
36
16
  ): z.ZodType<OpenEnum<T>, z.ZodTypeDef, unknown> {
@@ -3,8 +3,9 @@
3
3
  */
4
4
 
5
5
  export { blobLikeSchema, isBlobLike } from "./blobs.js";
6
- export type { ClosedEnum, OpenEnum, Unrecognized } from "./enums.js";
6
+ export type { ClosedEnum, OpenEnum } from "./enums.js";
7
7
  export type { Result } from "./fp.js";
8
8
  export type { PageIterator, Paginator } from "./operations.js";
9
9
  export { createPageIterator } from "./operations.js";
10
10
  export { RFCDate } from "./rfcdate.js";
11
+ export * from "./unrecognized.js";
@@ -0,0 +1,27 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ declare const __brand: unique symbol;
6
+ export type Unrecognized<T> = T & { [__brand]: "unrecognized" };
7
+
8
+ function unrecognized<T>(value: T): Unrecognized<T> {
9
+ globalCount++;
10
+ return value as Unrecognized<T>;
11
+ }
12
+
13
+ let globalCount = 0;
14
+ let refCount = 0;
15
+ export function startCountingUnrecognized() {
16
+ refCount++;
17
+ const start = globalCount;
18
+ return {
19
+ end: () => {
20
+ const count = globalCount - start;
21
+ if (--refCount === 0) globalCount = 0;
22
+ return count;
23
+ },
24
+ };
25
+ }
26
+
27
+ export { unrecognized };
package/types/enums.d.ts CHANGED
@@ -1,16 +1,9 @@
1
1
  import * as z from "zod/v3";
2
- declare const __brand: unique symbol;
3
- export type Unrecognized<T> = T & {
4
- [__brand]: "unrecognized";
5
- };
2
+ import { Unrecognized } from "./unrecognized.js";
6
3
  export type ClosedEnum<T extends Readonly<Record<string, string | number>>> = T[keyof T];
7
4
  export type OpenEnum<T extends Readonly<Record<string, string | number>>> = T[keyof T] | Unrecognized<T[keyof T] extends number ? number : string>;
8
- export declare function unrecognizedCounter(): {
9
- count: () => number;
10
- };
11
5
  export declare function inboundSchema<T extends Record<string, string>>(enumObj: T): z.ZodType<OpenEnum<T>, z.ZodTypeDef, unknown>;
12
6
  export declare function inboundSchemaInt<T extends Record<string, number | string>>(enumObj: T): z.ZodType<OpenEnum<T>, z.ZodTypeDef, unknown>;
13
7
  export declare function outboundSchema<T extends Record<string, string>>(_: T): z.ZodType<string, z.ZodTypeDef, OpenEnum<T>>;
14
8
  export declare function outboundSchemaInt<T extends Record<string, number | string>>(_: T): z.ZodType<number, z.ZodTypeDef, OpenEnum<T>>;
15
- export {};
16
9
  //# sourceMappingURL=enums.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../src/types/enums.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,CAAC,MAAM,OAAO,EAAE,OAAO,MAAM,CAAC;AACrC,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,CAAC,OAAO,CAAC,EAAE,cAAc,CAAA;CAAE,CAAC;AAChE,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,IACxE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACb,MAAM,MAAM,QAAQ,CAA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C,CAAC,CAE9C"}
package/types/enums.js CHANGED
@@ -36,35 +36,17 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  };
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.unrecognizedCounter = unrecognizedCounter;
40
39
  exports.inboundSchema = inboundSchema;
41
40
  exports.inboundSchemaInt = inboundSchemaInt;
42
41
  exports.outboundSchema = outboundSchema;
43
42
  exports.outboundSchemaInt = outboundSchemaInt;
44
43
  const z = __importStar(require("zod/v3"));
45
- function unrecognized(value) {
46
- unrecognizedCount++;
47
- return value;
48
- }
49
- let unrecognizedCount = 0;
50
- let refCount = 0;
51
- function unrecognizedCounter() {
52
- refCount++;
53
- const start = unrecognizedCount;
54
- return {
55
- count: () => {
56
- const count = unrecognizedCount - start;
57
- if (--refCount === 0)
58
- unrecognizedCount = 0;
59
- return count;
60
- },
61
- };
62
- }
44
+ const unrecognized_js_1 = require("./unrecognized.js");
63
45
  function inboundSchema(enumObj) {
64
46
  const options = Object.values(enumObj);
65
47
  return z.union([
66
48
  ...options.map(x => z.literal(x)),
67
- z.string().transform(x => unrecognized(x)),
49
+ z.string().transform(x => (0, unrecognized_js_1.unrecognized)(x)),
68
50
  ]);
69
51
  }
70
52
  function inboundSchemaInt(enumObj) {
@@ -72,7 +54,7 @@ function inboundSchemaInt(enumObj) {
72
54
  const options = Object.values(enumObj).filter(v => typeof v === "number");
73
55
  return z.union([
74
56
  ...options.map(x => z.literal(x)),
75
- z.number().int().transform(x => unrecognized(x)),
57
+ z.number().int().transform(x => (0, unrecognized_js_1.unrecognized)(x)),
76
58
  ]);
77
59
  }
78
60
  function outboundSchema(_) {
@@ -1 +1 @@
1
- {"version":3,"file":"enums.js","sourceRoot":"","sources":["../src/types/enums.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBH,kDAUC;AAED,sCAQC;AAED,4CASC;AAED,wCAIC;AAED,8CAIC;AA5DD,0CA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GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,IAAA,8BAAY,EAAC,CAAC,CAAC,CAAC;KAC1C,CAAC,CAAC;AACZ,CAAC;AAED,SAAgB,cAAc,CAC5B,CAAI;IAEJ,OAAO,CAAC,CAAC,MAAM,EAAS,CAAC;AAC3B,CAAC;AAED,SAAgB,iBAAiB,CAC/B,CAAI;IAEJ,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAS,CAAC;AACjC,CAAC"}
package/types/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  export { blobLikeSchema, isBlobLike } from "./blobs.js";
2
- export type { ClosedEnum, OpenEnum, Unrecognized } from "./enums.js";
2
+ export type { ClosedEnum, OpenEnum } from "./enums.js";
3
3
  export type { Result } from "./fp.js";
4
4
  export type { PageIterator, Paginator } from "./operations.js";
5
5
  export { createPageIterator } from "./operations.js";
6
6
  export { RFCDate } from "./rfcdate.js";
7
+ export * from "./unrecognized.js";
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/types/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxD,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACrE,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACtC,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/types/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxD,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACvD,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACtC,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,cAAc,mBAAmB,CAAC"}
package/types/index.js CHANGED
@@ -2,6 +2,20 @@
2
2
  /*
3
3
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
4
  */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
17
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
18
+ };
5
19
  Object.defineProperty(exports, "__esModule", { value: true });
6
20
  exports.RFCDate = exports.createPageIterator = exports.isBlobLike = exports.blobLikeSchema = void 0;
7
21
  var blobs_js_1 = require("./blobs.js");
@@ -11,4 +25,5 @@ var operations_js_1 = require("./operations.js");
11
25
  Object.defineProperty(exports, "createPageIterator", { enumerable: true, get: function () { return operations_js_1.createPageIterator; } });
12
26
  var rfcdate_js_1 = require("./rfcdate.js");
13
27
  Object.defineProperty(exports, "RFCDate", { enumerable: true, get: function () { return rfcdate_js_1.RFCDate; } });
28
+ __exportStar(require("./unrecognized.js"), exports);
14
29
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/types/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,uCAAwD;AAA/C,0GAAA,cAAc,OAAA;AAAE,sGAAA,UAAU,OAAA;AAInC,iDAAqD;AAA5C,mHAAA,kBAAkB,OAAA;AAC3B,2CAAuC;AAA9B,qGAAA,OAAO,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/types/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;AAEH,uCAAwD;AAA/C,0GAAA,cAAc,OAAA;AAAE,sGAAA,UAAU,OAAA;AAInC,iDAAqD;AAA5C,mHAAA,kBAAkB,OAAA;AAC3B,2CAAuC;AAA9B,qGAAA,OAAO,OAAA;AAChB,oDAAkC"}
@@ -0,0 +1,10 @@
1
+ declare const __brand: unique symbol;
2
+ export type Unrecognized<T> = T & {
3
+ [__brand]: "unrecognized";
4
+ };
5
+ declare function unrecognized<T>(value: T): Unrecognized<T>;
6
+ export declare function startCountingUnrecognized(): {
7
+ end: () => number;
8
+ };
9
+ export { unrecognized };
10
+ //# sourceMappingURL=unrecognized.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unrecognized.d.ts","sourceRoot":"","sources":["../src/types/unrecognized.ts"],"names":[],"mappings":"AAIA,OAAO,CAAC,MAAM,OAAO,EAAE,OAAO,MAAM,CAAC;AACrC,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,CAAC,OAAO,CAAC,EAAE,cAAc,CAAA;CAAE,CAAC;AAEhE,iBAAS,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAGlD;AAID,wBAAgB,yBAAyB;;EAUxC;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.startCountingUnrecognized = startCountingUnrecognized;
7
+ exports.unrecognized = unrecognized;
8
+ function unrecognized(value) {
9
+ globalCount++;
10
+ return value;
11
+ }
12
+ let globalCount = 0;
13
+ let refCount = 0;
14
+ function startCountingUnrecognized() {
15
+ refCount++;
16
+ const start = globalCount;
17
+ return {
18
+ end: () => {
19
+ const count = globalCount - start;
20
+ if (--refCount === 0)
21
+ globalCount = 0;
22
+ return count;
23
+ },
24
+ };
25
+ }
26
+ //# sourceMappingURL=unrecognized.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unrecognized.js","sourceRoot":"","sources":["../src/types/unrecognized.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAYH,8DAUC;AAEQ,oCAAY;AAnBrB,SAAS,YAAY,CAAI,KAAQ;IAC/B,WAAW,EAAE,CAAC;IACd,OAAO,KAAwB,CAAC;AAClC,CAAC;AAED,IAAI,WAAW,GAAG,CAAC,CAAC;AACpB,IAAI,QAAQ,GAAG,CAAC,CAAC;AACjB,SAAgB,yBAAyB;IACvC,QAAQ,EAAE,CAAC;IACX,MAAM,KAAK,GAAG,WAAW,CAAC;IAC1B,OAAO;QACL,GAAG,EAAE,GAAG,EAAE;YACR,MAAM,KAAK,GAAG,WAAW,GAAG,KAAK,CAAC;YAClC,IAAI,EAAE,QAAQ,KAAK,CAAC;gBAAE,WAAW,GAAG,CAAC,CAAC;YACtC,OAAO,KAAK,CAAC;QACf,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1,23 +0,0 @@
1
- import * as z from "zod/v3";
2
- import { Result as SafeParseResult } from "../../types/fp.js";
3
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
- /**
5
- * Additional configuration options for the message.
6
- */
7
- export type CustomMessageConfig = {
8
- /**
9
- * 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'.
10
- */
11
- userInitiatedNonVoiceSessionBehavior?: string | undefined;
12
- };
13
- /** @internal */
14
- export declare const CustomMessageConfig$inboundSchema: z.ZodType<CustomMessageConfig, z.ZodTypeDef, unknown>;
15
- /** @internal */
16
- export type CustomMessageConfig$Outbound = {
17
- user_initiated_non_voice_session_behavior: string;
18
- };
19
- /** @internal */
20
- export declare const CustomMessageConfig$outboundSchema: z.ZodType<CustomMessageConfig$Outbound, z.ZodTypeDef, CustomMessageConfig>;
21
- export declare function customMessageConfigToJSON(customMessageConfig: CustomMessageConfig): string;
22
- export declare function customMessageConfigFromJSON(jsonString: string): SafeParseResult<CustomMessageConfig, SDKValidationError>;
23
- //# sourceMappingURL=custommessageconfig.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"custommessageconfig.d.ts","sourceRoot":"","sources":["../../src/models/components/custommessageconfig.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,oCAAoC,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3D,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,OAAO,CACvD,mBAAmB,EACnB,CAAC,CAAC,UAAU,EACZ,OAAO,CAQP,CAAC;AACH,gBAAgB;AAChB,MAAM,MAAM,4BAA4B,GAAG;IACzC,yCAAyC,EAAE,MAAM,CAAC;CACnD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,kCAAkC,EAAE,CAAC,CAAC,OAAO,CACxD,4BAA4B,EAC5B,CAAC,CAAC,UAAU,EACZ,mBAAmB,CAQnB,CAAC;AAEH,wBAAgB,yBAAyB,CACvC,mBAAmB,EAAE,mBAAmB,GACvC,MAAM,CAIR;AACD,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,mBAAmB,EAAE,kBAAkB,CAAC,CAM1D"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"custommessageconfig.js","sourceRoot":"","sources":["../../src/models/components/custommessageconfig.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDH,8DAMC;AACD,kEAQC;AA/DD,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAAiD;AAcjD,gBAAgB;AACH,QAAA,iCAAiC,GAI1C,CAAC,CAAC,MAAM,CAAC;IACX,yCAAyC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC;CAC5E,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,2CAA2C,EACzC,sCAAsC;KACzC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAMH,gBAAgB;AACH,QAAA,kCAAkC,GAI3C,CAAC,CAAC,MAAM,CAAC;IACX,oCAAoC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC;CACvE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,oCAAoC,EAClC,2CAA2C;KAC9C,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,yBAAyB,CACvC,mBAAwC;IAExC,OAAO,IAAI,CAAC,SAAS,CACnB,0CAAkC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAC9D,CAAC;AACJ,CAAC;AACD,SAAgB,2BAA2B,CACzC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,yCAAiC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC7D,iDAAiD,CAClD,CAAC;AACJ,CAAC"}
@@ -1,68 +0,0 @@
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
- }