TypeScript Definitions
CdnClientOptions
ts
export type CdnClientOptions = {
/**
* Project metafile URL.
*/
metafile: string;
};
1
2
3
4
5
6
2
3
4
5
6
CdnLocale
ts
export type CdnLocale = {
/**
* Locale code.
*/
locale: string;
/**
* Boolean indicating if this is the base locale.
*/
isBaseLocale: boolean;
/**
* Language code.
*/
language: string;
/**
* Region code.
*/
region?: string;
/**
* Script code.
*/
script?: string;
/**
* Boolean indicating if the locale is right-to-left.
*/
isRtl: boolean;
/**
* Locale name.
*/
name: string;
/**
* Localized locale name.
*/
localizedName: string;
};
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
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
CdnLocalesOptions
ts
export type CdnLocalesOptions = {
/**
* Exclude the base locale from the list of locales.
*/
excludeBaseLocale?: boolean;
};
1
2
3
4
5
6
2
3
4
5
6
CdnFetchOptions
ts
export type CdnFetchOptions = {
/**
* Select single or multiple files to fetch from the CDN.
*
* Default: all files in the metafile.
*/
files?: (CdnFile | string)[] | CdnFile | string;
/**
* Select single or multiple locales to fetch from the CDN.
*
* Default: all locales in the metafile.
*/
locales?: string[] | string;
/**
* Exclude the base locale from the list of locales to fetch.
*/
excludeBaseLocale?: boolean;
};
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
CdnResponse
ts
export type CdnResponse =
/**
* Map of file IDs with locales map as value.
*/
| {
[fileId: string]: {
/**
* Map of locales with file content as value.
*/
[locale: string]: object | string;
};
}
/**
* Map of locales with file content as value.
*/
| {
[locale: string]: object | string;
}
/**
* File content.
*/
| object
/**
* File content as string for non-JSON files.
*/
| string;
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
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
CdnFile
ts
export type CdnFile = {
/**
* File ID.
*/
id: string;
/**
* File name.
*/
file: string;
/**
* File path.
*/
path: string;
/**
* File library.
*/
library: string;
/**
* File module.
*/
module: string;
/**
* File build type.
*/
buildType: string;
/**
* File product flavors.
*/
productFlavors: string[];
/**
* File locales.
*/
locales: CdnFileLocale[];
};
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
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
CdnFileLocale
ts
export type CdnFileLocale = {
/**
* Locale code.
*/
locale: string;
/**
* Boolean indicating if this is the base locale.
*/
isBaseLocale: boolean;
/**
* File URI.
*/
uri: string;
};
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16