@transifex/api 4.2.4 → 4.3.0
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": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"description": "Transifex API SDK",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"transifex",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@babel/cli": "^7.17.10",
|
|
32
32
|
"@babel/core": "^7.17.10",
|
|
33
33
|
"@babel/preset-env": "^7.17.10",
|
|
34
|
-
"@transifex/jsonapi": "^4.
|
|
34
|
+
"@transifex/jsonapi": "^4.3.0",
|
|
35
35
|
"babel-eslint": "^10.1.0",
|
|
36
36
|
"babel-loader": "^8.2.5",
|
|
37
37
|
"eslint": "^7.32.0",
|
package/src/transifexApi.d.ts
CHANGED
|
@@ -15,21 +15,21 @@ declare class JsonApiResource {
|
|
|
15
15
|
});
|
|
16
16
|
get(key: string): any;
|
|
17
17
|
set(key: string, value: any): void;
|
|
18
|
-
|
|
19
|
-
static
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
static
|
|
18
|
+
reload(include: string[]): Promise<void>;
|
|
19
|
+
static get(arg:string | AnyDict): Promise<JsonApiResource>;
|
|
20
|
+
fetch(relationshipName: string, force: boolean): Promise<JsonApiResource | Collection>;
|
|
21
|
+
save(arg: AnyDict | string[]): Promise<void>;
|
|
22
|
+
static create({
|
|
23
23
|
id: string,
|
|
24
24
|
attributes: AnyDict,
|
|
25
25
|
relationships: AnyDict,
|
|
26
26
|
links: StringDict,
|
|
27
|
-
}): JsonApiResource
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
}): Promise<JsonApiResource>;
|
|
28
|
+
delete(): Promise<void>;
|
|
29
|
+
change(field: string, value:JsonApiResource | null): Promise<void>;
|
|
30
|
+
add(field: string, values: JsonApiResource[]): Promise<void>;
|
|
31
|
+
reset(field: string, values: JsonApiResource[]): Promise<void>;
|
|
32
|
+
remove(field: string, values: JsonApiResource[]): Promise<void>;
|
|
33
33
|
static list(): Collection;
|
|
34
34
|
static extra(AnyDict): Collection;
|
|
35
35
|
static filter(filters: AnyDict): Collection;
|
|
@@ -42,9 +42,9 @@ declare class JsonApiResource {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
declare class Collection {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
fetch(): Promise<void>;
|
|
46
|
+
getNext(): Promise<Collection>;
|
|
47
|
+
getPrevious(): Promise<Collection>;
|
|
48
48
|
extra(AnyDict): Collection;
|
|
49
49
|
filter(filters: AnyDict): Collection;
|
|
50
50
|
page(arg: AnyDict | string): Collection;
|
|
@@ -58,7 +58,7 @@ declare class Collection {
|
|
|
58
58
|
type AuthFunction = () => string;
|
|
59
59
|
type AuthArgument = string | AuthFunction;
|
|
60
60
|
|
|
61
|
-
declare
|
|
61
|
+
export declare class TransifexApi {
|
|
62
62
|
constructor({ host: string, auth: AuthArgument });
|
|
63
63
|
setup({ host: string, auth: AuthArgument }): void;
|
|
64
64
|
|
|
@@ -117,4 +117,4 @@ declare export class TransifexApi {
|
|
|
117
117
|
resource_strings_revisions: typeof JsonApiResource;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
declare
|
|
120
|
+
export declare var transifexApi: TransifexApi;
|