syllable-sdk 1.0.1 → 1.0.2-rc.10

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 (157) hide show
  1. package/README.md +8 -0
  2. package/bin/mcp-server.js +628 -111
  3. package/bin/mcp-server.js.map +32 -18
  4. package/docs/sdks/batches/README.md +4 -4
  5. package/docs/sdks/campaigns/README.md +24 -0
  6. package/docs/sdks/incidents/README.md +0 -8
  7. package/docs/sdks/prompts/README.md +4 -2
  8. package/docs/sdks/pronunciations/README.md +277 -1
  9. package/docs/sdks/workflows/README.md +8 -8
  10. package/examples/package-lock.json +1 -1
  11. package/funcs/pronunciationsPronunciationsDeleteCsv.d.ts +13 -0
  12. package/funcs/pronunciationsPronunciationsDeleteCsv.d.ts.map +1 -0
  13. package/funcs/pronunciationsPronunciationsDeleteCsv.js +101 -0
  14. package/funcs/pronunciationsPronunciationsDeleteCsv.js.map +1 -0
  15. package/funcs/pronunciationsPronunciationsDownloadCsv.d.ts +14 -0
  16. package/funcs/pronunciationsPronunciationsDownloadCsv.d.ts.map +1 -0
  17. package/funcs/pronunciationsPronunciationsDownloadCsv.js +108 -0
  18. package/funcs/pronunciationsPronunciationsDownloadCsv.js.map +1 -0
  19. package/funcs/pronunciationsPronunciationsGet.d.ts +14 -0
  20. package/funcs/pronunciationsPronunciationsGet.d.ts.map +1 -0
  21. package/funcs/pronunciationsPronunciationsGet.js +101 -0
  22. package/funcs/pronunciationsPronunciationsGet.js.map +1 -0
  23. package/funcs/pronunciationsPronunciationsGetMetadata.d.ts +14 -0
  24. package/funcs/pronunciationsPronunciationsGetMetadata.d.ts.map +1 -0
  25. package/funcs/pronunciationsPronunciationsGetMetadata.js +101 -0
  26. package/funcs/pronunciationsPronunciationsGetMetadata.js.map +1 -0
  27. package/jsr.json +1 -1
  28. package/lib/config.d.ts +3 -3
  29. package/lib/config.js +3 -3
  30. package/lib/config.js.map +1 -1
  31. package/mcp-server/mcp-server.js +1 -1
  32. package/mcp-server/mcp-server.js.map +1 -1
  33. package/mcp-server/server.d.ts.map +1 -1
  34. package/mcp-server/server.js +9 -1
  35. package/mcp-server/server.js.map +1 -1
  36. package/mcp-server/tools/pronunciationsPronunciationsDeleteCsv.d.ts +3 -0
  37. package/mcp-server/tools/pronunciationsPronunciationsDeleteCsv.d.ts.map +1 -0
  38. package/mcp-server/tools/pronunciationsPronunciationsDeleteCsv.js +23 -0
  39. package/mcp-server/tools/pronunciationsPronunciationsDeleteCsv.js.map +1 -0
  40. package/mcp-server/tools/pronunciationsPronunciationsDownloadCsv.d.ts +3 -0
  41. package/mcp-server/tools/pronunciationsPronunciationsDownloadCsv.d.ts.map +1 -0
  42. package/mcp-server/tools/pronunciationsPronunciationsDownloadCsv.js +24 -0
  43. package/mcp-server/tools/pronunciationsPronunciationsDownloadCsv.js.map +1 -0
  44. package/mcp-server/tools/pronunciationsPronunciationsGet.d.ts +3 -0
  45. package/mcp-server/tools/pronunciationsPronunciationsGet.d.ts.map +1 -0
  46. package/mcp-server/tools/pronunciationsPronunciationsGet.js +24 -0
  47. package/mcp-server/tools/pronunciationsPronunciationsGet.js.map +1 -0
  48. package/mcp-server/tools/pronunciationsPronunciationsGetMetadata.d.ts +3 -0
  49. package/mcp-server/tools/pronunciationsPronunciationsGetMetadata.d.ts.map +1 -0
  50. package/mcp-server/tools/pronunciationsPronunciationsGetMetadata.js +24 -0
  51. package/mcp-server/tools/pronunciationsPronunciationsGetMetadata.js.map +1 -0
  52. package/models/components/campaignproperties.d.ts +3 -0
  53. package/models/components/campaignproperties.d.ts.map +1 -1
  54. package/models/components/campaignproperties.js +1 -0
  55. package/models/components/campaignproperties.js.map +1 -1
  56. package/models/components/dictionarymetadata.d.ts +36 -0
  57. package/models/components/dictionarymetadata.d.ts.map +1 -0
  58. package/models/components/dictionarymetadata.js +73 -0
  59. package/models/components/dictionarymetadata.js.map +1 -0
  60. package/models/components/incidentcreaterequest.d.ts +3 -1
  61. package/models/components/incidentcreaterequest.d.ts.map +1 -1
  62. package/models/components/incidentcreaterequest.js.map +1 -1
  63. package/models/components/incidentresponse.d.ts +3 -1
  64. package/models/components/incidentresponse.d.ts.map +1 -1
  65. package/models/components/incidentresponse.js.map +1 -1
  66. package/models/components/incidentupdaterequest.d.ts +3 -11
  67. package/models/components/incidentupdaterequest.d.ts.map +1 -1
  68. package/models/components/incidentupdaterequest.js +0 -8
  69. package/models/components/incidentupdaterequest.js.map +1 -1
  70. package/models/components/index.d.ts +5 -0
  71. package/models/components/index.d.ts.map +1 -1
  72. package/models/components/index.js +5 -0
  73. package/models/components/index.js.map +1 -1
  74. package/models/components/matchtype.d.ts +34 -0
  75. package/models/components/matchtype.d.ts.map +1 -0
  76. package/models/components/matchtype.js +64 -0
  77. package/models/components/matchtype.js.map +1 -0
  78. package/models/components/outboundcampaign.d.ts +9 -0
  79. package/models/components/outboundcampaign.d.ts.map +1 -1
  80. package/models/components/outboundcampaign.js +4 -0
  81. package/models/components/outboundcampaign.js.map +1 -1
  82. package/models/components/outboundcampaigninput.d.ts +9 -0
  83. package/models/components/outboundcampaigninput.d.ts.map +1 -1
  84. package/models/components/outboundcampaigninput.js +4 -0
  85. package/models/components/outboundcampaigninput.js.map +1 -1
  86. package/models/components/promptcreaterequest.d.ts +5 -0
  87. package/models/components/promptcreaterequest.d.ts.map +1 -1
  88. package/models/components/promptcreaterequest.js +4 -0
  89. package/models/components/promptcreaterequest.js.map +1 -1
  90. package/models/components/promptresponse.d.ts +5 -5
  91. package/models/components/promptresponse.d.ts.map +1 -1
  92. package/models/components/promptresponse.js +2 -2
  93. package/models/components/promptresponse.js.map +1 -1
  94. package/models/components/promptupdaterequest.d.ts +5 -5
  95. package/models/components/promptupdaterequest.d.ts.map +1 -1
  96. package/models/components/promptupdaterequest.js +2 -2
  97. package/models/components/promptupdaterequest.js.map +1 -1
  98. package/models/components/pronunciationoverride.d.ts +52 -0
  99. package/models/components/pronunciationoverride.d.ts.map +1 -0
  100. package/models/components/pronunciationoverride.js +97 -0
  101. package/models/components/pronunciationoverride.js.map +1 -0
  102. package/models/components/pronunciationoverridesdictionary.d.ts +68 -0
  103. package/models/components/pronunciationoverridesdictionary.d.ts.map +1 -0
  104. package/models/components/pronunciationoverridesdictionary.js +78 -0
  105. package/models/components/pronunciationoverridesdictionary.js.map +1 -0
  106. package/models/components/pronunciationscsvuploadresponse.d.ts +6 -6
  107. package/models/components/pronunciationscsvuploadresponse.d.ts.map +1 -1
  108. package/models/components/pronunciationscsvuploadresponse.js +6 -6
  109. package/models/components/pronunciationscsvuploadresponse.js.map +1 -1
  110. package/models/components/voicedisplayinfo.d.ts +34 -0
  111. package/models/components/voicedisplayinfo.d.ts.map +1 -0
  112. package/models/components/voicedisplayinfo.js +80 -0
  113. package/models/components/voicedisplayinfo.js.map +1 -0
  114. package/models/operations/index.d.ts +1 -0
  115. package/models/operations/index.d.ts.map +1 -1
  116. package/models/operations/index.js +1 -0
  117. package/models/operations/index.js.map +1 -1
  118. package/models/operations/pronunciationsdownloadcsv.d.ts +35 -0
  119. package/models/operations/pronunciationsdownloadcsv.d.ts.map +1 -0
  120. package/models/operations/pronunciationsdownloadcsv.js +82 -0
  121. package/models/operations/pronunciationsdownloadcsv.js.map +1 -0
  122. package/openapi.json +387 -110
  123. package/package.json +1 -1
  124. package/sdk/pronunciations.d.ts +17 -0
  125. package/sdk/pronunciations.d.ts.map +1 -1
  126. package/sdk/pronunciations.js +28 -0
  127. package/sdk/pronunciations.js.map +1 -1
  128. package/src/funcs/pronunciationsPronunciationsDeleteCsv.ts +139 -0
  129. package/src/funcs/pronunciationsPronunciationsDownloadCsv.ts +147 -0
  130. package/src/funcs/pronunciationsPronunciationsGet.ts +139 -0
  131. package/src/funcs/pronunciationsPronunciationsGetMetadata.ts +139 -0
  132. package/src/lib/config.ts +3 -3
  133. package/src/mcp-server/mcp-server.ts +1 -1
  134. package/src/mcp-server/server.ts +9 -1
  135. package/src/mcp-server/tools/pronunciationsPronunciationsDeleteCsv.ts +26 -0
  136. package/src/mcp-server/tools/pronunciationsPronunciationsDownloadCsv.ts +28 -0
  137. package/src/mcp-server/tools/pronunciationsPronunciationsGet.ts +28 -0
  138. package/src/mcp-server/tools/pronunciationsPronunciationsGetMetadata.ts +28 -0
  139. package/src/models/components/campaignproperties.ts +1 -0
  140. package/src/models/components/dictionarymetadata.ts +77 -0
  141. package/src/models/components/incidentcreaterequest.ts +3 -1
  142. package/src/models/components/incidentresponse.ts +3 -1
  143. package/src/models/components/incidentupdaterequest.ts +3 -23
  144. package/src/models/components/index.ts +5 -0
  145. package/src/models/components/matchtype.ts +37 -0
  146. package/src/models/components/outboundcampaign.ts +9 -0
  147. package/src/models/components/outboundcampaigninput.ts +9 -0
  148. package/src/models/components/promptcreaterequest.ts +9 -0
  149. package/src/models/components/promptresponse.ts +7 -7
  150. package/src/models/components/promptupdaterequest.ts +7 -7
  151. package/src/models/components/pronunciationoverride.ts +120 -0
  152. package/src/models/components/pronunciationoverridesdictionary.ts +124 -0
  153. package/src/models/components/pronunciationscsvuploadresponse.ts +12 -12
  154. package/src/models/components/voicedisplayinfo.ts +82 -0
  155. package/src/models/operations/index.ts +1 -0
  156. package/src/models/operations/pronunciationsdownloadcsv.ts +84 -0
  157. package/src/sdk/pronunciations.ts +53 -0
@@ -0,0 +1,120 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ MatchType,
12
+ MatchType$inboundSchema,
13
+ MatchType$outboundSchema,
14
+ } from "./matchtype.js";
15
+
16
+ /**
17
+ * A single text replacement rule.
18
+ */
19
+ export type PronunciationOverride = {
20
+ text: string;
21
+ replacement: string;
22
+ languages?: Array<string> | undefined;
23
+ provider?: string | undefined;
24
+ voice?: string | undefined;
25
+ /**
26
+ * Matching strategy for override text.
27
+ */
28
+ matchType?: MatchType | undefined;
29
+ matchOptions?: Array<string> | undefined;
30
+ enabled?: boolean | undefined;
31
+ notes?: string | undefined;
32
+ };
33
+
34
+ /** @internal */
35
+ export const PronunciationOverride$inboundSchema: z.ZodType<
36
+ PronunciationOverride,
37
+ z.ZodTypeDef,
38
+ unknown
39
+ > = z.object({
40
+ text: z.string(),
41
+ replacement: z.string(),
42
+ languages: z.array(z.string()).optional(),
43
+ provider: z.string().default(""),
44
+ voice: z.string().default(""),
45
+ match_type: MatchType$inboundSchema.optional(),
46
+ match_options: z.array(z.string()).optional(),
47
+ enabled: z.boolean().default(true),
48
+ notes: z.string().default(""),
49
+ }).transform((v) => {
50
+ return remap$(v, {
51
+ "match_type": "matchType",
52
+ "match_options": "matchOptions",
53
+ });
54
+ });
55
+
56
+ /** @internal */
57
+ export type PronunciationOverride$Outbound = {
58
+ text: string;
59
+ replacement: string;
60
+ languages?: Array<string> | undefined;
61
+ provider: string;
62
+ voice: string;
63
+ match_type?: string | undefined;
64
+ match_options?: Array<string> | undefined;
65
+ enabled: boolean;
66
+ notes: string;
67
+ };
68
+
69
+ /** @internal */
70
+ export const PronunciationOverride$outboundSchema: z.ZodType<
71
+ PronunciationOverride$Outbound,
72
+ z.ZodTypeDef,
73
+ PronunciationOverride
74
+ > = z.object({
75
+ text: z.string(),
76
+ replacement: z.string(),
77
+ languages: z.array(z.string()).optional(),
78
+ provider: z.string().default(""),
79
+ voice: z.string().default(""),
80
+ matchType: MatchType$outboundSchema.optional(),
81
+ matchOptions: z.array(z.string()).optional(),
82
+ enabled: z.boolean().default(true),
83
+ notes: z.string().default(""),
84
+ }).transform((v) => {
85
+ return remap$(v, {
86
+ matchType: "match_type",
87
+ matchOptions: "match_options",
88
+ });
89
+ });
90
+
91
+ /**
92
+ * @internal
93
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
94
+ */
95
+ export namespace PronunciationOverride$ {
96
+ /** @deprecated use `PronunciationOverride$inboundSchema` instead. */
97
+ export const inboundSchema = PronunciationOverride$inboundSchema;
98
+ /** @deprecated use `PronunciationOverride$outboundSchema` instead. */
99
+ export const outboundSchema = PronunciationOverride$outboundSchema;
100
+ /** @deprecated use `PronunciationOverride$Outbound` instead. */
101
+ export type Outbound = PronunciationOverride$Outbound;
102
+ }
103
+
104
+ export function pronunciationOverrideToJSON(
105
+ pronunciationOverride: PronunciationOverride,
106
+ ): string {
107
+ return JSON.stringify(
108
+ PronunciationOverride$outboundSchema.parse(pronunciationOverride),
109
+ );
110
+ }
111
+
112
+ export function pronunciationOverrideFromJSON(
113
+ jsonString: string,
114
+ ): SafeParseResult<PronunciationOverride, SDKValidationError> {
115
+ return safeParse(
116
+ jsonString,
117
+ (x) => PronunciationOverride$inboundSchema.parse(JSON.parse(x)),
118
+ `Failed to parse 'PronunciationOverride' from JSON`,
119
+ );
120
+ }
@@ -0,0 +1,124 @@
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
+ import {
10
+ DictionaryMetadata,
11
+ DictionaryMetadata$inboundSchema,
12
+ DictionaryMetadata$Outbound,
13
+ DictionaryMetadata$outboundSchema,
14
+ } from "./dictionarymetadata.js";
15
+ import {
16
+ PronunciationOverride,
17
+ PronunciationOverride$inboundSchema,
18
+ PronunciationOverride$Outbound,
19
+ PronunciationOverride$outboundSchema,
20
+ } from "./pronunciationoverride.js";
21
+ import {
22
+ VoiceDisplayInfo,
23
+ VoiceDisplayInfo$inboundSchema,
24
+ VoiceDisplayInfo$Outbound,
25
+ VoiceDisplayInfo$outboundSchema,
26
+ } from "./voicedisplayinfo.js";
27
+
28
+ /**
29
+ * Container for all TTS pronunciation overrides belonging to the sub-organisation.
30
+ *
31
+ * @remarks
32
+ *
33
+ * Stored in the `config_values` table via ConfigDao. The Syllable API persists uploaded CSV
34
+ * pronunciation rules, and Bubblegum's PronunciationOverridesPlugin reads them to apply text
35
+ * replacements before TTS processing.
36
+ *
37
+ * Example:
38
+ * dao = ConfigDao(db_session)
39
+ * await dao.register_model('tts.pronunciations', PronunciationOverridesDictionary)
40
+ *
41
+ * pod = PronunciationOverridesDictionary(
42
+ * pronunciations=[...],
43
+ * metadata=DictionaryMetadata(entries=10, hash='sha256:...'),
44
+ * )
45
+ * result = await dao.upsert('pronunciations_v1', pod)
46
+ *
47
+ * record = await dao.get('pronunciations_v1', PronunciationOverridesDictionary)
48
+ * if record:
49
+ * pronunciations = record.value.pronunciations
50
+ */
51
+ export type PronunciationOverridesDictionary = {
52
+ type?: string | undefined;
53
+ pronunciations: Array<PronunciationOverride>;
54
+ voices?: { [k: string]: VoiceDisplayInfo } | undefined;
55
+ /**
56
+ * Audit metadata associated with a dictionary.
57
+ */
58
+ metadata: DictionaryMetadata;
59
+ };
60
+
61
+ /** @internal */
62
+ export const PronunciationOverridesDictionary$inboundSchema: z.ZodType<
63
+ PronunciationOverridesDictionary,
64
+ z.ZodTypeDef,
65
+ unknown
66
+ > = z.object({
67
+ type: z.string().default("pronunciations_v1"),
68
+ pronunciations: z.array(PronunciationOverride$inboundSchema),
69
+ voices: z.record(VoiceDisplayInfo$inboundSchema).optional(),
70
+ metadata: DictionaryMetadata$inboundSchema,
71
+ });
72
+
73
+ /** @internal */
74
+ export type PronunciationOverridesDictionary$Outbound = {
75
+ type: string;
76
+ pronunciations: Array<PronunciationOverride$Outbound>;
77
+ voices?: { [k: string]: VoiceDisplayInfo$Outbound } | undefined;
78
+ metadata: DictionaryMetadata$Outbound;
79
+ };
80
+
81
+ /** @internal */
82
+ export const PronunciationOverridesDictionary$outboundSchema: z.ZodType<
83
+ PronunciationOverridesDictionary$Outbound,
84
+ z.ZodTypeDef,
85
+ PronunciationOverridesDictionary
86
+ > = z.object({
87
+ type: z.string().default("pronunciations_v1"),
88
+ pronunciations: z.array(PronunciationOverride$outboundSchema),
89
+ voices: z.record(VoiceDisplayInfo$outboundSchema).optional(),
90
+ metadata: DictionaryMetadata$outboundSchema,
91
+ });
92
+
93
+ /**
94
+ * @internal
95
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
96
+ */
97
+ export namespace PronunciationOverridesDictionary$ {
98
+ /** @deprecated use `PronunciationOverridesDictionary$inboundSchema` instead. */
99
+ export const inboundSchema = PronunciationOverridesDictionary$inboundSchema;
100
+ /** @deprecated use `PronunciationOverridesDictionary$outboundSchema` instead. */
101
+ export const outboundSchema = PronunciationOverridesDictionary$outboundSchema;
102
+ /** @deprecated use `PronunciationOverridesDictionary$Outbound` instead. */
103
+ export type Outbound = PronunciationOverridesDictionary$Outbound;
104
+ }
105
+
106
+ export function pronunciationOverridesDictionaryToJSON(
107
+ pronunciationOverridesDictionary: PronunciationOverridesDictionary,
108
+ ): string {
109
+ return JSON.stringify(
110
+ PronunciationOverridesDictionary$outboundSchema.parse(
111
+ pronunciationOverridesDictionary,
112
+ ),
113
+ );
114
+ }
115
+
116
+ export function pronunciationOverridesDictionaryFromJSON(
117
+ jsonString: string,
118
+ ): SafeParseResult<PronunciationOverridesDictionary, SDKValidationError> {
119
+ return safeParse(
120
+ jsonString,
121
+ (x) => PronunciationOverridesDictionary$inboundSchema.parse(JSON.parse(x)),
122
+ `Failed to parse 'PronunciationOverridesDictionary' from JSON`,
123
+ );
124
+ }
@@ -13,10 +13,10 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
13
13
  */
14
14
  export type PronunciationsCsvUploadResponse = {
15
15
  revision: number;
16
- hash?: string | null | undefined;
17
- entries?: number | null | undefined;
16
+ hash: string;
17
+ entries: number;
18
18
  uploadedAt?: Date | undefined;
19
- uploadedBy?: string | null | undefined;
19
+ uploadedBy: string;
20
20
  };
21
21
 
22
22
  /** @internal */
@@ -26,11 +26,11 @@ export const PronunciationsCsvUploadResponse$inboundSchema: z.ZodType<
26
26
  unknown
27
27
  > = z.object({
28
28
  revision: z.number().int(),
29
- hash: z.nullable(z.string()).optional(),
30
- entries: z.nullable(z.number().int()).optional(),
29
+ hash: z.string(),
30
+ entries: z.number().int(),
31
31
  uploaded_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
32
32
  .optional(),
33
- uploaded_by: z.nullable(z.string()).optional(),
33
+ uploaded_by: z.string(),
34
34
  }).transform((v) => {
35
35
  return remap$(v, {
36
36
  "uploaded_at": "uploadedAt",
@@ -41,10 +41,10 @@ export const PronunciationsCsvUploadResponse$inboundSchema: z.ZodType<
41
41
  /** @internal */
42
42
  export type PronunciationsCsvUploadResponse$Outbound = {
43
43
  revision: number;
44
- hash?: string | null | undefined;
45
- entries?: number | null | undefined;
44
+ hash: string;
45
+ entries: number;
46
46
  uploaded_at?: string | undefined;
47
- uploaded_by?: string | null | undefined;
47
+ uploaded_by: string;
48
48
  };
49
49
 
50
50
  /** @internal */
@@ -54,10 +54,10 @@ export const PronunciationsCsvUploadResponse$outboundSchema: z.ZodType<
54
54
  PronunciationsCsvUploadResponse
55
55
  > = z.object({
56
56
  revision: z.number().int(),
57
- hash: z.nullable(z.string()).optional(),
58
- entries: z.nullable(z.number().int()).optional(),
57
+ hash: z.string(),
58
+ entries: z.number().int(),
59
59
  uploadedAt: z.date().transform(v => v.toISOString()).optional(),
60
- uploadedBy: z.nullable(z.string()).optional(),
60
+ uploadedBy: z.string(),
61
61
  }).transform((v) => {
62
62
  return remap$(v, {
63
63
  uploadedAt: "uploaded_at",
@@ -0,0 +1,82 @@
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
+ /**
12
+ * Display metadata for a canonical voice identifier.
13
+ */
14
+ export type VoiceDisplayInfo = {
15
+ displayName: string;
16
+ provider: string;
17
+ };
18
+
19
+ /** @internal */
20
+ export const VoiceDisplayInfo$inboundSchema: z.ZodType<
21
+ VoiceDisplayInfo,
22
+ z.ZodTypeDef,
23
+ unknown
24
+ > = z.object({
25
+ display_name: z.string(),
26
+ provider: z.string(),
27
+ }).transform((v) => {
28
+ return remap$(v, {
29
+ "display_name": "displayName",
30
+ });
31
+ });
32
+
33
+ /** @internal */
34
+ export type VoiceDisplayInfo$Outbound = {
35
+ display_name: string;
36
+ provider: string;
37
+ };
38
+
39
+ /** @internal */
40
+ export const VoiceDisplayInfo$outboundSchema: z.ZodType<
41
+ VoiceDisplayInfo$Outbound,
42
+ z.ZodTypeDef,
43
+ VoiceDisplayInfo
44
+ > = z.object({
45
+ displayName: z.string(),
46
+ provider: z.string(),
47
+ }).transform((v) => {
48
+ return remap$(v, {
49
+ displayName: "display_name",
50
+ });
51
+ });
52
+
53
+ /**
54
+ * @internal
55
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
56
+ */
57
+ export namespace VoiceDisplayInfo$ {
58
+ /** @deprecated use `VoiceDisplayInfo$inboundSchema` instead. */
59
+ export const inboundSchema = VoiceDisplayInfo$inboundSchema;
60
+ /** @deprecated use `VoiceDisplayInfo$outboundSchema` instead. */
61
+ export const outboundSchema = VoiceDisplayInfo$outboundSchema;
62
+ /** @deprecated use `VoiceDisplayInfo$Outbound` instead. */
63
+ export type Outbound = VoiceDisplayInfo$Outbound;
64
+ }
65
+
66
+ export function voiceDisplayInfoToJSON(
67
+ voiceDisplayInfo: VoiceDisplayInfo,
68
+ ): string {
69
+ return JSON.stringify(
70
+ VoiceDisplayInfo$outboundSchema.parse(voiceDisplayInfo),
71
+ );
72
+ }
73
+
74
+ export function voiceDisplayInfoFromJSON(
75
+ jsonString: string,
76
+ ): SafeParseResult<VoiceDisplayInfo, SDKValidationError> {
77
+ return safeParse(
78
+ jsonString,
79
+ (x) => VoiceDisplayInfo$inboundSchema.parse(JSON.parse(x)),
80
+ `Failed to parse 'VoiceDisplayInfo' from JSON`,
81
+ );
82
+ }
@@ -70,6 +70,7 @@ export * from "./promptsdelete.js";
70
70
  export * from "./promptsgetbyid.js";
71
71
  export * from "./promptshistory.js";
72
72
  export * from "./promptslist.js";
73
+ export * from "./pronunciationsdownloadcsv.js";
73
74
  export * from "./rolesdelete.js";
74
75
  export * from "./rolesgetbyid.js";
75
76
  export * from "./roleslist.js";
@@ -0,0 +1,84 @@
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 PronunciationsDownloadCsvResponse = {
12
+ headers: { [k: string]: Array<string> };
13
+ result: ReadableStream<Uint8Array>;
14
+ };
15
+
16
+ /** @internal */
17
+ export const PronunciationsDownloadCsvResponse$inboundSchema: z.ZodType<
18
+ PronunciationsDownloadCsvResponse,
19
+ z.ZodTypeDef,
20
+ unknown
21
+ > = z.object({
22
+ Headers: z.record(z.array(z.string())),
23
+ Result: z.instanceof(ReadableStream<Uint8Array>),
24
+ }).transform((v) => {
25
+ return remap$(v, {
26
+ "Headers": "headers",
27
+ "Result": "result",
28
+ });
29
+ });
30
+
31
+ /** @internal */
32
+ export type PronunciationsDownloadCsvResponse$Outbound = {
33
+ Headers: { [k: string]: Array<string> };
34
+ Result: ReadableStream<Uint8Array>;
35
+ };
36
+
37
+ /** @internal */
38
+ export const PronunciationsDownloadCsvResponse$outboundSchema: z.ZodType<
39
+ PronunciationsDownloadCsvResponse$Outbound,
40
+ z.ZodTypeDef,
41
+ PronunciationsDownloadCsvResponse
42
+ > = z.object({
43
+ headers: z.record(z.array(z.string())),
44
+ result: z.instanceof(ReadableStream<Uint8Array>),
45
+ }).transform((v) => {
46
+ return remap$(v, {
47
+ headers: "Headers",
48
+ result: "Result",
49
+ });
50
+ });
51
+
52
+ /**
53
+ * @internal
54
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
55
+ */
56
+ export namespace PronunciationsDownloadCsvResponse$ {
57
+ /** @deprecated use `PronunciationsDownloadCsvResponse$inboundSchema` instead. */
58
+ export const inboundSchema = PronunciationsDownloadCsvResponse$inboundSchema;
59
+ /** @deprecated use `PronunciationsDownloadCsvResponse$outboundSchema` instead. */
60
+ export const outboundSchema =
61
+ PronunciationsDownloadCsvResponse$outboundSchema;
62
+ /** @deprecated use `PronunciationsDownloadCsvResponse$Outbound` instead. */
63
+ export type Outbound = PronunciationsDownloadCsvResponse$Outbound;
64
+ }
65
+
66
+ export function pronunciationsDownloadCsvResponseToJSON(
67
+ pronunciationsDownloadCsvResponse: PronunciationsDownloadCsvResponse,
68
+ ): string {
69
+ return JSON.stringify(
70
+ PronunciationsDownloadCsvResponse$outboundSchema.parse(
71
+ pronunciationsDownloadCsvResponse,
72
+ ),
73
+ );
74
+ }
75
+
76
+ export function pronunciationsDownloadCsvResponseFromJSON(
77
+ jsonString: string,
78
+ ): SafeParseResult<PronunciationsDownloadCsvResponse, SDKValidationError> {
79
+ return safeParse(
80
+ jsonString,
81
+ (x) => PronunciationsDownloadCsvResponse$inboundSchema.parse(JSON.parse(x)),
82
+ `Failed to parse 'PronunciationsDownloadCsvResponse' from JSON`,
83
+ );
84
+ }
@@ -2,12 +2,53 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ import { pronunciationsPronunciationsDeleteCsv } from "../funcs/pronunciationsPronunciationsDeleteCsv.js";
6
+ import { pronunciationsPronunciationsDownloadCsv } from "../funcs/pronunciationsPronunciationsDownloadCsv.js";
7
+ import { pronunciationsPronunciationsGet } from "../funcs/pronunciationsPronunciationsGet.js";
8
+ import { pronunciationsPronunciationsGetMetadata } from "../funcs/pronunciationsPronunciationsGetMetadata.js";
5
9
  import { pronunciationsPronunciationsUploadCsv } from "../funcs/pronunciationsPronunciationsUploadCsv.js";
6
10
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
7
11
  import * as components from "../models/components/index.js";
12
+ import * as operations from "../models/operations/index.js";
8
13
  import { unwrapAsync } from "../types/fp.js";
9
14
 
10
15
  export class Pronunciations extends ClientSDK {
16
+ /**
17
+ * Get Pronunciations Dictionary
18
+ */
19
+ async pronunciationsGet(
20
+ options?: RequestOptions,
21
+ ): Promise<components.PronunciationOverridesDictionary> {
22
+ return unwrapAsync(pronunciationsPronunciationsGet(
23
+ this,
24
+ options,
25
+ ));
26
+ }
27
+
28
+ /**
29
+ * Get Pronunciations Metadata
30
+ */
31
+ async pronunciationsGetMetadata(
32
+ options?: RequestOptions,
33
+ ): Promise<components.DictionaryMetadata> {
34
+ return unwrapAsync(pronunciationsPronunciationsGetMetadata(
35
+ this,
36
+ options,
37
+ ));
38
+ }
39
+
40
+ /**
41
+ * Download Pronunciations Csv
42
+ */
43
+ async pronunciationsDownloadCsv(
44
+ options?: RequestOptions,
45
+ ): Promise<operations.PronunciationsDownloadCsvResponse> {
46
+ return unwrapAsync(pronunciationsPronunciationsDownloadCsv(
47
+ this,
48
+ options,
49
+ ));
50
+ }
51
+
11
52
  /**
12
53
  * Upload Pronunciations Csv
13
54
  */
@@ -21,4 +62,16 @@ export class Pronunciations extends ClientSDK {
21
62
  options,
22
63
  ));
23
64
  }
65
+
66
+ /**
67
+ * Delete Pronunciations Dictionary
68
+ */
69
+ async pronunciationsDeleteCsv(
70
+ options?: RequestOptions,
71
+ ): Promise<void> {
72
+ return unwrapAsync(pronunciationsPronunciationsDeleteCsv(
73
+ this,
74
+ options,
75
+ ));
76
+ }
24
77
  }