@transifex/api 6.0.2 → 7.0.1
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transifex/api",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.1",
|
|
4
4
|
"description": "Transifex API SDK",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"transifex",
|
|
@@ -25,23 +25,23 @@
|
|
|
25
25
|
"publish-npm": "npm publish"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"core-js": "^3.
|
|
28
|
+
"core-js": "^3.35.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@babel/cli": "^7.
|
|
32
|
-
"@babel/core": "^7.
|
|
33
|
-
"@babel/
|
|
34
|
-
"@
|
|
35
|
-
"
|
|
36
|
-
"babel-loader": "^
|
|
37
|
-
"eslint": "^
|
|
38
|
-
"eslint-config-airbnb-base": "^
|
|
39
|
-
"eslint-plugin-import": "^2.
|
|
40
|
-
"webpack": "^5.
|
|
41
|
-
"webpack-cli": "^
|
|
31
|
+
"@babel/cli": "^7.23.4",
|
|
32
|
+
"@babel/core": "^7.23.7",
|
|
33
|
+
"@babel/eslint-parser": "^7.23.3",
|
|
34
|
+
"@babel/preset-env": "^7.23.8",
|
|
35
|
+
"@transifex/jsonapi": "^7.0.1",
|
|
36
|
+
"babel-loader": "^9.1.3",
|
|
37
|
+
"eslint": "^8.56.0",
|
|
38
|
+
"eslint-config-airbnb-base": "^15.0.0",
|
|
39
|
+
"eslint-plugin-import": "^2.29.1",
|
|
40
|
+
"webpack": "^5.89.0",
|
|
41
|
+
"webpack-cli": "^5.1.4"
|
|
42
42
|
},
|
|
43
43
|
"engines": {
|
|
44
|
-
"node": ">=
|
|
44
|
+
"node": ">=16.0.0"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
package/src/transifexApi.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ interface StringDict {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
declare class JsonApiResource {
|
|
10
|
-
constructor({
|
|
10
|
+
constructor(params: {
|
|
11
11
|
id: string,
|
|
12
12
|
attributes: AnyDict,
|
|
13
13
|
relationships: AnyDict,
|
|
@@ -19,7 +19,7 @@ declare class JsonApiResource {
|
|
|
19
19
|
static get(arg:string | AnyDict): Promise<JsonApiResource>;
|
|
20
20
|
fetch(relationshipName: string, force: boolean): Promise<JsonApiResource | Collection>;
|
|
21
21
|
save(arg: AnyDict | string[]): Promise<void>;
|
|
22
|
-
static create({
|
|
22
|
+
static create(params: {
|
|
23
23
|
id: string,
|
|
24
24
|
attributes: AnyDict,
|
|
25
25
|
relationships: AnyDict,
|
|
@@ -41,6 +41,19 @@ declare class JsonApiResource {
|
|
|
41
41
|
static allPages(): Iterable<Collection>;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
declare class JsonApiResourceDownload extends JsonApiResource {
|
|
45
|
+
static download(params: AnyDict): Promise<any>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
declare class JsonApiResourceUpload extends JsonApiResource {
|
|
49
|
+
static upload(params: AnyDict): Promise<any>;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
declare class JsonApiResourceResource extends JsonApiResource {
|
|
53
|
+
purge(): Promise<number>;
|
|
54
|
+
downloadSource(params?: AnyDict): Promise<any>;
|
|
55
|
+
}
|
|
56
|
+
|
|
44
57
|
declare class Collection {
|
|
45
58
|
fetch(): Promise<void>;
|
|
46
59
|
getNext(): Promise<Collection>;
|
|
@@ -59,34 +72,34 @@ type AuthFunction = () => string;
|
|
|
59
72
|
type AuthArgument = string | AuthFunction;
|
|
60
73
|
|
|
61
74
|
export declare class TransifexApi {
|
|
62
|
-
constructor({ host
|
|
63
|
-
setup({ host
|
|
75
|
+
constructor(params: { host?: string, auth: AuthArgument });
|
|
76
|
+
setup(params: { host?: string, auth: AuthArgument }): void;
|
|
64
77
|
|
|
65
78
|
Organization: typeof JsonApiResource;
|
|
66
79
|
User: typeof JsonApiResource;
|
|
67
80
|
Language: typeof JsonApiResource;
|
|
68
81
|
Project: typeof JsonApiResource;
|
|
69
82
|
ProjectWebhook: typeof JsonApiResource;
|
|
70
|
-
Resource: typeof
|
|
83
|
+
Resource: typeof JsonApiResourceResource;
|
|
71
84
|
ResourceString: typeof JsonApiResource;
|
|
72
|
-
ResourceStringsAsyncDownload: typeof
|
|
73
|
-
ResourceStringsAsyncUpload: typeof
|
|
85
|
+
ResourceStringsAsyncDownload: typeof JsonApiResourceDownload;
|
|
86
|
+
ResourceStringsAsyncUpload: typeof JsonApiResourceUpload;
|
|
74
87
|
ResourceStringComment: typeof JsonApiResource;
|
|
75
88
|
I18nFormat: typeof JsonApiResource;
|
|
76
89
|
ContextScreenshotMap: typeof JsonApiResource;
|
|
77
90
|
ContextScreenshot: typeof JsonApiResource;
|
|
78
|
-
OrganizationActivityReportsAsyncDownload: typeof
|
|
79
|
-
ProjectActivityReportsAsyncDownload: typeof
|
|
80
|
-
ResourceActivityReportsAsyncDownload: typeof
|
|
81
|
-
TeamActivityReportsAsyncDownload: typeof
|
|
91
|
+
OrganizationActivityReportsAsyncDownload: typeof JsonApiResourceDownload;
|
|
92
|
+
ProjectActivityReportsAsyncDownload: typeof JsonApiResourceDownload;
|
|
93
|
+
ResourceActivityReportsAsyncDownload: typeof JsonApiResourceDownload;
|
|
94
|
+
TeamActivityReportsAsyncDownload: typeof JsonApiResourceDownload;
|
|
82
95
|
ResourceLanguageStats: typeof JsonApiResource;
|
|
83
96
|
ResourceTranslation: typeof JsonApiResource;
|
|
84
|
-
ResourceTranslationsAsyncDownload: typeof
|
|
85
|
-
ResourceTranslationsAsyncUpload: typeof
|
|
97
|
+
ResourceTranslationsAsyncDownload: typeof JsonApiResourceDownload;
|
|
98
|
+
ResourceTranslationsAsyncUpload: typeof JsonApiResourceUpload;
|
|
86
99
|
TeamMembership: typeof JsonApiResource;
|
|
87
100
|
Team: typeof JsonApiResource;
|
|
88
|
-
TmxAsyncDownload: typeof
|
|
89
|
-
TmxAsyncUpload: typeof
|
|
101
|
+
TmxAsyncDownload: typeof JsonApiResourceDownload;
|
|
102
|
+
TmxAsyncUpload: typeof JsonApiResourceUpload;
|
|
90
103
|
ResourceStringsRevision: typeof JsonApiResource;
|
|
91
104
|
|
|
92
105
|
organizations: typeof JsonApiResource;
|
|
@@ -94,26 +107,26 @@ export declare class TransifexApi {
|
|
|
94
107
|
languages: typeof JsonApiResource;
|
|
95
108
|
projects: typeof JsonApiResource;
|
|
96
109
|
project_webhooks: typeof JsonApiResource;
|
|
97
|
-
resources: typeof
|
|
110
|
+
resources: typeof JsonApiResourceResource;
|
|
98
111
|
resource_strings: typeof JsonApiResource;
|
|
99
|
-
resource_strings_async_downloads: typeof
|
|
100
|
-
resource_strings_async_uploads: typeof
|
|
112
|
+
resource_strings_async_downloads: typeof JsonApiResourceDownload;
|
|
113
|
+
resource_strings_async_uploads: typeof JsonApiResourceUpload;
|
|
101
114
|
resource_string_comments: typeof JsonApiResource;
|
|
102
115
|
i18n_formats: typeof JsonApiResource;
|
|
103
116
|
context_screenshot_maps: typeof JsonApiResource;
|
|
104
117
|
context_screenshots: typeof JsonApiResource;
|
|
105
|
-
organization_activity_reports_async_downloads: typeof
|
|
106
|
-
project_activity_reports_async_downloads: typeof
|
|
107
|
-
resource_activity_reports_async_downloads: typeof
|
|
108
|
-
team_activity_reports_async_downloads: typeof
|
|
118
|
+
organization_activity_reports_async_downloads: typeof JsonApiResourceDownload;
|
|
119
|
+
project_activity_reports_async_downloads: typeof JsonApiResourceDownload;
|
|
120
|
+
resource_activity_reports_async_downloads: typeof JsonApiResourceDownload;
|
|
121
|
+
team_activity_reports_async_downloads: typeof JsonApiResourceDownload;
|
|
109
122
|
resource_language_stats: typeof JsonApiResource;
|
|
110
123
|
resource_translations: typeof JsonApiResource;
|
|
111
|
-
resource_translations_async_downloads: typeof
|
|
112
|
-
resource_translations_async_uploads: typeof
|
|
124
|
+
resource_translations_async_downloads: typeof JsonApiResourceDownload;
|
|
125
|
+
resource_translations_async_uploads: typeof JsonApiResourceUpload;
|
|
113
126
|
team_memberships: typeof JsonApiResource;
|
|
114
127
|
teams: typeof JsonApiResource;
|
|
115
|
-
tmx_async_downloads: typeof
|
|
116
|
-
tmx_async_uploads: typeof
|
|
128
|
+
tmx_async_downloads: typeof JsonApiResourceDownload;
|
|
129
|
+
tmx_async_uploads: typeof JsonApiResourceUpload;
|
|
117
130
|
resource_strings_revisions: typeof JsonApiResource;
|
|
118
131
|
}
|
|
119
132
|
|