/
index.d.ts
44 lines (37 loc) · 885 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
export interface ISSMLCheckOptions {
platform?: "google" | "amazon" | "all";
locale?: string;
validateAudioFiles?: boolean;
unsupportedTags?: string[];
getPositions?: boolean;
}
export interface ISSMLCheckSimpleError {
type: string;
}
export interface ISSMLCheckTagError {
type: "tag";
tag: string;
attribute: string;
value: string;
}
export interface ISSMLCheckAudioError {
type: "audio";
value: string;
detail: string;
}
export type ISSMLCheckError =
| ISSMLCheckSimpleError
| ISSMLCheckAudioError
| ISSMLCheckTagError;
export interface ISSMLCheckVerifyResponse {
errors?: ISSMLCheckError[];
fixedSSML?: string;
}
export function check(
ssml: string,
options?: ISSMLCheckOptions
): Promise<ISSMLCheckError[] | undefined>;
export function verifyAndFix(
ssml: string,
options?: ISSMLCheckOptions
): Promise<ISSMLCheckVerifyResponse>;