forked from noscripter/nodejs-onesky-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
98 lines (90 loc) · 1.93 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
interface OneSkyOptions {
/**
* OneSky project ID
*/
projectId: number;
/**
* OneSky private key
*/
secret: string;
/**
* OneSky public key
*/
apiKey: string;
}
interface OneSkyFileOptions extends OneSkyOptions {
/**
* Language to download
*/
language: string;
}
export function getFile(
opts: OneSkyFileOptions & {
fileName: string;
}
): Promise<string>;
export function getMultilingualFile(
opts: OneSkyFileOptions & {
fileName: string;
format: string;
}
): Promise<string>;
export function getFiles(opts: OneSkyOptions): Promise<string>;
export function getLanguages(opts: OneSkyOptions): Promise<string>;
type Format =
| "IOS_STRINGS"
| "IOS_STRINGSDICT_XML"
| "GNU_PO"
| "ANDROID_XML"
| "ANDROID_JSON"
| "JAVA_PROPERTIES"
| "RUBY_YML"
| "RUBY_YAML"
| "FLASH_XML"
| "GNU_POT"
| "RRC"
| "RESX"
| "HIERARCHICAL_JSON"
| "PHP"
| "PHP_SHORT_ARRAY"
| "PHP_VARIABLES"
| "HTML"
| "RESW"
| "YML"
| "YAML"
| "ADEMPIERE_XML"
| "IDEMPIERE_XML"
| "QT_TS_XML"
| "XLIFF"
| "RESJSON"
| "TMX"
| "L10N"
| "INI"
| "REQUIREJS";
export function postFile(
opts: OneSkyFileOptions & {
format: Format;
content: string;
/**
* For strings that cannot be found in newly uploaded file with same file name, keep those strings unchange if set to true.
* Deprecate those strings if set to false. Notice that different files will not interfere each other in the same project.
* For example, with setting is_keeping_all_strings to false, uploading en2.po will not deprecate strings of previously uploaded file, en.po.
*/
keepStrings: boolean;
fileName: string;
}
): Promise<void>;
export function postScreenshot(
opts: OneSkyOptions & {
name: string;
image: string;
tags: {
key: string;
x: number;
y: number;
width: number;
height: number;
file: string;
}[];
}
): Promise<void>;