@lokalise/projects-engine-contracts 8.0.0 → 8.1.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/dist/apiContracts/contributorsContracts.d.ts +35 -35
- package/dist/apiContracts/defaultReviewersContracts.d.ts +42 -42
- package/dist/apiContracts/languageContracts.d.ts +50 -50
- package/dist/apiContracts/projectSettingsContracts.d.ts +20 -20
- package/dist/apiContracts/projectsContracts.d.ts +187 -121
- package/dist/apiContracts/projectsContracts.js +21 -2
- package/dist/apiContracts/projectsContracts.js.map +1 -1
- package/dist/apiContracts/translationSettingsContracts.d.ts +44 -44
- package/dist/schemas/projectSchemas.d.ts +86 -0
- package/dist/schemas/projectSchemas.js +48 -1
- package/dist/schemas/projectSchemas.js.map +1 -1
- package/package.json +3 -2
|
@@ -5,42 +5,42 @@
|
|
|
5
5
|
* endpoint. It is a POST because the request carries a body (the languages to scope the
|
|
6
6
|
* suggestions to) even though it is semantically a read.
|
|
7
7
|
*/
|
|
8
|
-
export declare const listSuggestedContributorsContract: import("@lokalise/api-contracts").PayloadRouteDefinition<import("zod
|
|
9
|
-
languages: import("zod
|
|
10
|
-
limit: import("zod
|
|
11
|
-
offset: import("zod
|
|
12
|
-
}, import("zod/v4/core").$strip>, import("zod
|
|
13
|
-
languages: import("zod
|
|
14
|
-
lang_iso: import("zod
|
|
15
|
-
lang_iso_bcp47: import("zod
|
|
16
|
-
contributors: import("zod
|
|
17
|
-
user_id: import("zod
|
|
18
|
-
user_uuid: import("zod
|
|
19
|
-
email: import("zod
|
|
20
|
-
fullname: import("zod
|
|
21
|
-
avatar_url: import("zod
|
|
22
|
-
role_id: import("zod
|
|
23
|
-
is_owner: import("zod
|
|
24
|
-
is_admin: import("zod
|
|
25
|
-
is_pending: import("zod
|
|
26
|
-
last_logged_in_at: import("zod
|
|
27
|
-
last_logged_in_at_timestamp: import("zod
|
|
28
|
-
team_role: import("zod
|
|
29
|
-
languages: import("zod
|
|
30
|
-
lang_iso: import("zod
|
|
31
|
-
lang_name: import("zod
|
|
32
|
-
is_writable: import("zod
|
|
8
|
+
export declare const listSuggestedContributorsContract: import("@lokalise/api-contracts").PayloadRouteDefinition<import("zod").ZodObject<{
|
|
9
|
+
languages: import("zod").ZodArray<import("zod").ZodString>;
|
|
10
|
+
limit: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
11
|
+
offset: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
12
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
13
|
+
languages: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
|
|
14
|
+
lang_iso: import("zod").ZodString;
|
|
15
|
+
lang_iso_bcp47: import("zod").ZodString;
|
|
16
|
+
contributors: import("zod").ZodArray<import("zod").ZodObject<{
|
|
17
|
+
user_id: import("zod").ZodNumber;
|
|
18
|
+
user_uuid: import("zod").ZodOptional<import("zod").ZodGUID>;
|
|
19
|
+
email: import("zod").ZodEmail;
|
|
20
|
+
fullname: import("zod").ZodString;
|
|
21
|
+
avatar_url: import("zod").ZodString;
|
|
22
|
+
role_id: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
23
|
+
is_owner: import("zod").ZodBoolean;
|
|
24
|
+
is_admin: import("zod").ZodBoolean;
|
|
25
|
+
is_pending: import("zod").ZodBoolean;
|
|
26
|
+
last_logged_in_at: import("zod").ZodNullable<import("zod").ZodISODateTime>;
|
|
27
|
+
last_logged_in_at_timestamp: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
28
|
+
team_role: import("zod").ZodString;
|
|
29
|
+
languages: import("zod").ZodArray<import("zod").ZodObject<{
|
|
30
|
+
lang_iso: import("zod").ZodString;
|
|
31
|
+
lang_name: import("zod").ZodString;
|
|
32
|
+
is_writable: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<0>, import("zod").ZodLiteral<1>, import("zod").ZodBoolean]>;
|
|
33
33
|
}, import("zod/v4/core").$strip>>;
|
|
34
34
|
}, import("zod/v4/core").$strip>>;
|
|
35
|
-
total: import("zod
|
|
35
|
+
total: import("zod").ZodNumber;
|
|
36
36
|
}, import("zod/v4/core").$strip>>;
|
|
37
|
-
limit: import("zod
|
|
38
|
-
offset: import("zod
|
|
39
|
-
project_uuid: import("zod
|
|
40
|
-
}, import("zod/v4/core").$strip>, import("zod
|
|
41
|
-
workspaceId: import("zod
|
|
42
|
-
projectId: import("zod
|
|
43
|
-
}, import("zod/v4/core").$strip>, undefined, import("zod
|
|
44
|
-
authorization: import("zod
|
|
45
|
-
'content-type': import("zod
|
|
37
|
+
limit: import("zod").ZodNumber;
|
|
38
|
+
offset: import("zod").ZodNumber;
|
|
39
|
+
project_uuid: import("zod").ZodGUID;
|
|
40
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
41
|
+
workspaceId: import("zod").ZodGUID;
|
|
42
|
+
projectId: import("zod").ZodGUID;
|
|
43
|
+
}, import("zod/v4/core").$strip>, undefined, import("zod").ZodObject<{
|
|
44
|
+
authorization: import("zod").ZodString;
|
|
45
|
+
'content-type': import("zod").ZodOptional<import("zod").ZodString>;
|
|
46
46
|
}, import("zod/v4/core").$strip>, undefined, false, false, undefined>;
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
export declare const getDefaultReviewersContract: import("@lokalise/api-contracts").GetRouteDefinition<import("zod
|
|
2
|
-
data: import("zod
|
|
3
|
-
projectId: import("zod
|
|
4
|
-
languageId: import("zod
|
|
5
|
-
contributorId: import("zod
|
|
1
|
+
export declare const getDefaultReviewersContract: import("@lokalise/api-contracts").GetRouteDefinition<import("zod").ZodObject<{
|
|
2
|
+
data: import("zod").ZodArray<import("zod").ZodObject<{
|
|
3
|
+
projectId: import("zod").ZodGUID;
|
|
4
|
+
languageId: import("zod").ZodGUID;
|
|
5
|
+
contributorId: import("zod").ZodGUID;
|
|
6
6
|
}, import("zod/v4/core").$strip>>;
|
|
7
|
-
}, import("zod/v4/core").$strip>, import("zod
|
|
8
|
-
workspaceId: import("zod
|
|
9
|
-
projectId: import("zod
|
|
10
|
-
}, import("zod/v4/core").$strip>, undefined, import("zod
|
|
11
|
-
authorization: import("zod
|
|
12
|
-
'content-type': import("zod
|
|
7
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
8
|
+
workspaceId: import("zod").ZodGUID;
|
|
9
|
+
projectId: import("zod").ZodGUID;
|
|
10
|
+
}, import("zod/v4/core").$strip>, undefined, import("zod").ZodObject<{
|
|
11
|
+
authorization: import("zod").ZodString;
|
|
12
|
+
'content-type': import("zod").ZodOptional<import("zod").ZodString>;
|
|
13
13
|
}, import("zod/v4/core").$strip>, undefined, false, false, undefined>;
|
|
14
|
-
export declare const putDefaultReviewersContract: import("@lokalise/api-contracts").PayloadRouteDefinition<import("zod
|
|
15
|
-
languageId: import("zod
|
|
16
|
-
contributorId: import("zod
|
|
17
|
-
email: import("zod
|
|
18
|
-
fullname: import("zod
|
|
19
|
-
langIso: import("zod
|
|
20
|
-
}, import("zod/v4/core").$strip>>, import("zod
|
|
21
|
-
data: import("zod
|
|
22
|
-
projectId: import("zod
|
|
23
|
-
languageId: import("zod
|
|
24
|
-
contributorId: import("zod
|
|
14
|
+
export declare const putDefaultReviewersContract: import("@lokalise/api-contracts").PayloadRouteDefinition<import("zod").ZodArray<import("zod").ZodObject<{
|
|
15
|
+
languageId: import("zod").ZodGUID;
|
|
16
|
+
contributorId: import("zod").ZodGUID;
|
|
17
|
+
email: import("zod").ZodEmail;
|
|
18
|
+
fullname: import("zod").ZodString;
|
|
19
|
+
langIso: import("zod").ZodString;
|
|
20
|
+
}, import("zod/v4/core").$strip>>, import("zod").ZodObject<{
|
|
21
|
+
data: import("zod").ZodArray<import("zod").ZodObject<{
|
|
22
|
+
projectId: import("zod").ZodGUID;
|
|
23
|
+
languageId: import("zod").ZodGUID;
|
|
24
|
+
contributorId: import("zod").ZodGUID;
|
|
25
25
|
}, import("zod/v4/core").$strip>>;
|
|
26
|
-
}, import("zod/v4/core").$strip>, import("zod
|
|
27
|
-
workspaceId: import("zod
|
|
28
|
-
projectId: import("zod
|
|
29
|
-
}, import("zod/v4/core").$strip>, undefined, import("zod
|
|
30
|
-
authorization: import("zod
|
|
31
|
-
'content-type': import("zod
|
|
26
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
27
|
+
workspaceId: import("zod").ZodGUID;
|
|
28
|
+
projectId: import("zod").ZodGUID;
|
|
29
|
+
}, import("zod/v4/core").$strip>, undefined, import("zod").ZodObject<{
|
|
30
|
+
authorization: import("zod").ZodString;
|
|
31
|
+
'content-type': import("zod").ZodOptional<import("zod").ZodString>;
|
|
32
32
|
}, import("zod/v4/core").$strip>, undefined, false, false, undefined>;
|
|
33
|
-
export declare const putSyncDefaultReviewersContract: import("@lokalise/api-contracts").PayloadRouteDefinition<import("zod
|
|
34
|
-
targetLanguageIds: import("zod
|
|
35
|
-
contributorPairsForTargetLanguages: import("zod
|
|
36
|
-
languageId: import("zod
|
|
37
|
-
contributorId: import("zod
|
|
33
|
+
export declare const putSyncDefaultReviewersContract: import("@lokalise/api-contracts").PayloadRouteDefinition<import("zod").ZodObject<{
|
|
34
|
+
targetLanguageIds: import("zod").ZodArray<import("zod").ZodGUID>;
|
|
35
|
+
contributorPairsForTargetLanguages: import("zod").ZodArray<import("zod").ZodObject<{
|
|
36
|
+
languageId: import("zod").ZodGUID;
|
|
37
|
+
contributorId: import("zod").ZodGUID;
|
|
38
38
|
}, import("zod/v4/core").$strip>>;
|
|
39
|
-
}, import("zod/v4/core").$strip>, import("zod
|
|
40
|
-
data: import("zod
|
|
41
|
-
result: import("zod
|
|
39
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
40
|
+
data: import("zod").ZodObject<{
|
|
41
|
+
result: import("zod").ZodBoolean;
|
|
42
42
|
}, import("zod/v4/core").$strip>;
|
|
43
|
-
}, import("zod/v4/core").$strip>, import("zod
|
|
44
|
-
workspaceId: import("zod
|
|
45
|
-
projectId: import("zod
|
|
46
|
-
}, import("zod/v4/core").$strip>, undefined, import("zod
|
|
47
|
-
authorization: import("zod
|
|
48
|
-
'content-type': import("zod
|
|
43
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
44
|
+
workspaceId: import("zod").ZodGUID;
|
|
45
|
+
projectId: import("zod").ZodGUID;
|
|
46
|
+
}, import("zod/v4/core").$strip>, undefined, import("zod").ZodObject<{
|
|
47
|
+
authorization: import("zod").ZodString;
|
|
48
|
+
'content-type': import("zod").ZodOptional<import("zod").ZodString>;
|
|
49
49
|
}, import("zod/v4/core").$strip>, undefined, false, false, undefined>;
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
export declare const getProjectLanguagesContract: import("@lokalise/api-contracts").GetRouteDefinition<import("zod
|
|
2
|
-
data: import("zod
|
|
3
|
-
languages: import("zod
|
|
4
|
-
projectLanguageId: import("zod
|
|
5
|
-
languageId: import("zod
|
|
6
|
-
languageIso: import("zod
|
|
7
|
-
languageName: import("zod
|
|
8
|
-
isRtl: import("zod
|
|
9
|
-
projectLanguageUuid: import("zod
|
|
1
|
+
export declare const getProjectLanguagesContract: import("@lokalise/api-contracts").GetRouteDefinition<import("zod").ZodObject<{
|
|
2
|
+
data: import("zod").ZodObject<{
|
|
3
|
+
languages: import("zod").ZodArray<import("zod").ZodObject<{
|
|
4
|
+
projectLanguageId: import("zod").ZodNumber;
|
|
5
|
+
languageId: import("zod").ZodNumber;
|
|
6
|
+
languageIso: import("zod").ZodString;
|
|
7
|
+
languageName: import("zod").ZodString;
|
|
8
|
+
isRtl: import("zod").ZodBoolean;
|
|
9
|
+
projectLanguageUuid: import("zod").ZodGUID;
|
|
10
10
|
}, import("zod/v4/core").$strip>>;
|
|
11
11
|
}, import("zod/v4/core").$strip>;
|
|
12
|
-
meta: import("zod
|
|
13
|
-
count: import("zod
|
|
12
|
+
meta: import("zod").ZodObject<{
|
|
13
|
+
count: import("zod").ZodNumber;
|
|
14
14
|
}, import("zod/v4/core").$strip>;
|
|
15
|
-
}, import("zod/v4/core").$strip>, import("zod
|
|
16
|
-
workspaceId: import("zod
|
|
17
|
-
projectId: import("zod
|
|
18
|
-
}, import("zod/v4/core").$strip>, undefined, import("zod
|
|
19
|
-
authorization: import("zod
|
|
20
|
-
'content-type': import("zod
|
|
15
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
16
|
+
workspaceId: import("zod").ZodGUID;
|
|
17
|
+
projectId: import("zod").ZodGUID;
|
|
18
|
+
}, import("zod/v4/core").$strip>, undefined, import("zod").ZodObject<{
|
|
19
|
+
authorization: import("zod").ZodString;
|
|
20
|
+
'content-type': import("zod").ZodOptional<import("zod").ZodString>;
|
|
21
21
|
}, import("zod/v4/core").$strip>, undefined, false, false, undefined>;
|
|
22
|
-
export declare const addProjectLanguagesContract: import("@lokalise/api-contracts").PayloadRouteDefinition<import("zod
|
|
23
|
-
languages: import("zod
|
|
24
|
-
iso: import("zod
|
|
22
|
+
export declare const addProjectLanguagesContract: import("@lokalise/api-contracts").PayloadRouteDefinition<import("zod").ZodObject<{
|
|
23
|
+
languages: import("zod").ZodArray<import("zod").ZodObject<{
|
|
24
|
+
iso: import("zod").ZodString;
|
|
25
25
|
}, import("zod/v4/core").$strip>>;
|
|
26
|
-
}, import("zod/v4/core").$strip>, import("zod
|
|
27
|
-
data: import("zod
|
|
28
|
-
added: import("zod
|
|
29
|
-
projectLanguageId: import("zod
|
|
30
|
-
languageId: import("zod
|
|
31
|
-
languageIso: import("zod
|
|
32
|
-
languageName: import("zod
|
|
33
|
-
isRtl: import("zod
|
|
34
|
-
projectLanguageUuid: import("zod
|
|
26
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
27
|
+
data: import("zod").ZodObject<{
|
|
28
|
+
added: import("zod").ZodArray<import("zod").ZodObject<{
|
|
29
|
+
projectLanguageId: import("zod").ZodNumber;
|
|
30
|
+
languageId: import("zod").ZodNumber;
|
|
31
|
+
languageIso: import("zod").ZodString;
|
|
32
|
+
languageName: import("zod").ZodString;
|
|
33
|
+
isRtl: import("zod").ZodBoolean;
|
|
34
|
+
projectLanguageUuid: import("zod").ZodGUID;
|
|
35
35
|
}, import("zod/v4/core").$strip>>;
|
|
36
36
|
}, import("zod/v4/core").$strip>;
|
|
37
|
-
meta: import("zod
|
|
38
|
-
count: import("zod
|
|
37
|
+
meta: import("zod").ZodObject<{
|
|
38
|
+
count: import("zod").ZodNumber;
|
|
39
39
|
}, import("zod/v4/core").$strip>;
|
|
40
|
-
}, import("zod/v4/core").$strip>, import("zod
|
|
41
|
-
workspaceId: import("zod
|
|
42
|
-
projectId: import("zod
|
|
43
|
-
}, import("zod/v4/core").$strip>, undefined, import("zod
|
|
44
|
-
authorization: import("zod
|
|
45
|
-
'content-type': import("zod
|
|
40
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
41
|
+
workspaceId: import("zod").ZodGUID;
|
|
42
|
+
projectId: import("zod").ZodGUID;
|
|
43
|
+
}, import("zod/v4/core").$strip>, undefined, import("zod").ZodObject<{
|
|
44
|
+
authorization: import("zod").ZodString;
|
|
45
|
+
'content-type': import("zod").ZodOptional<import("zod").ZodString>;
|
|
46
46
|
}, import("zod/v4/core").$strip>, undefined, false, false, undefined>;
|
|
47
|
-
export declare const bulkUpdateProjectLanguagesContract: import("@lokalise/api-contracts").PayloadRouteDefinition<import("zod
|
|
48
|
-
languages: import("zod
|
|
49
|
-
iso: import("zod
|
|
50
|
-
baseLanguage: import("zod
|
|
47
|
+
export declare const bulkUpdateProjectLanguagesContract: import("@lokalise/api-contracts").PayloadRouteDefinition<import("zod").ZodObject<{
|
|
48
|
+
languages: import("zod").ZodArray<import("zod").ZodObject<{
|
|
49
|
+
iso: import("zod").ZodString;
|
|
50
|
+
baseLanguage: import("zod").ZodBoolean;
|
|
51
51
|
}, import("zod/v4/core").$strip>>;
|
|
52
|
-
}, import("zod/v4/core").$strip>, import("zod
|
|
53
|
-
data: import("zod
|
|
54
|
-
result: import("zod
|
|
52
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
53
|
+
data: import("zod").ZodObject<{
|
|
54
|
+
result: import("zod").ZodBoolean;
|
|
55
55
|
}, import("zod/v4/core").$strip>;
|
|
56
|
-
}, import("zod/v4/core").$strip>, import("zod
|
|
57
|
-
workspaceId: import("zod
|
|
58
|
-
projectId: import("zod
|
|
59
|
-
}, import("zod/v4/core").$strip>, undefined, import("zod
|
|
60
|
-
authorization: import("zod
|
|
61
|
-
'content-type': import("zod
|
|
56
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
57
|
+
workspaceId: import("zod").ZodGUID;
|
|
58
|
+
projectId: import("zod").ZodGUID;
|
|
59
|
+
}, import("zod/v4/core").$strip>, undefined, import("zod").ZodObject<{
|
|
60
|
+
authorization: import("zod").ZodString;
|
|
61
|
+
'content-type': import("zod").ZodOptional<import("zod").ZodString>;
|
|
62
62
|
}, import("zod/v4/core").$strip>, undefined, false, false, undefined>;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
export declare const getProjectSettingsContract: import("@lokalise/api-contracts").GetRouteDefinition<import("zod
|
|
2
|
-
data: import("zod
|
|
3
|
-
timezone: import("zod
|
|
1
|
+
export declare const getProjectSettingsContract: import("@lokalise/api-contracts").GetRouteDefinition<import("zod").ZodObject<{
|
|
2
|
+
data: import("zod").ZodObject<{
|
|
3
|
+
timezone: import("zod").ZodString;
|
|
4
4
|
}, import("zod/v4/core").$strip>;
|
|
5
|
-
}, import("zod/v4/core").$strip>, import("zod
|
|
6
|
-
workspaceId: import("zod
|
|
7
|
-
projectId: import("zod
|
|
8
|
-
}, import("zod/v4/core").$strip>, undefined, import("zod
|
|
9
|
-
authorization: import("zod
|
|
10
|
-
'content-type': import("zod
|
|
5
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
6
|
+
workspaceId: import("zod").ZodGUID;
|
|
7
|
+
projectId: import("zod").ZodGUID;
|
|
8
|
+
}, import("zod/v4/core").$strip>, undefined, import("zod").ZodObject<{
|
|
9
|
+
authorization: import("zod").ZodString;
|
|
10
|
+
'content-type': import("zod").ZodOptional<import("zod").ZodString>;
|
|
11
11
|
}, import("zod/v4/core").$strip>, undefined, false, false, undefined>;
|
|
12
|
-
export declare const putProjectSettingsContract: import("@lokalise/api-contracts").PayloadRouteDefinition<import("zod
|
|
13
|
-
timezone: import("zod
|
|
14
|
-
}, import("zod/v4/core").$strip>, import("zod
|
|
15
|
-
data: import("zod
|
|
16
|
-
timezone: import("zod
|
|
12
|
+
export declare const putProjectSettingsContract: import("@lokalise/api-contracts").PayloadRouteDefinition<import("zod").ZodObject<{
|
|
13
|
+
timezone: import("zod").ZodString;
|
|
14
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
15
|
+
data: import("zod").ZodObject<{
|
|
16
|
+
timezone: import("zod").ZodString;
|
|
17
17
|
}, import("zod/v4/core").$strip>;
|
|
18
|
-
}, import("zod/v4/core").$strip>, import("zod
|
|
19
|
-
workspaceId: import("zod
|
|
20
|
-
projectId: import("zod
|
|
21
|
-
}, import("zod/v4/core").$strip>, undefined, import("zod
|
|
22
|
-
authorization: import("zod
|
|
23
|
-
'content-type': import("zod
|
|
18
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
19
|
+
workspaceId: import("zod").ZodGUID;
|
|
20
|
+
projectId: import("zod").ZodGUID;
|
|
21
|
+
}, import("zod/v4/core").$strip>, undefined, import("zod").ZodObject<{
|
|
22
|
+
authorization: import("zod").ZodString;
|
|
23
|
+
'content-type': import("zod").ZodOptional<import("zod").ZodString>;
|
|
24
24
|
}, import("zod/v4/core").$strip>, undefined, false, false, undefined>;
|
|
@@ -1,173 +1,239 @@
|
|
|
1
|
-
export declare const getProjectContract: import("@lokalise/api-contracts").GetRouteDefinition<import("zod
|
|
2
|
-
data: import("zod
|
|
3
|
-
projectId: import("zod
|
|
4
|
-
uuid: import("zod
|
|
5
|
-
name: import("zod
|
|
6
|
-
description: import("zod
|
|
7
|
-
baseLanguage: import("zod
|
|
8
|
-
projectLanguageId: import("zod
|
|
9
|
-
languageId: import("zod
|
|
10
|
-
languageIso: import("zod
|
|
11
|
-
projectLanguageUuid: import("zod
|
|
1
|
+
export declare const getProjectContract: import("@lokalise/api-contracts").GetRouteDefinition<import("zod").ZodObject<{
|
|
2
|
+
data: import("zod").ZodObject<{
|
|
3
|
+
projectId: import("zod").ZodString;
|
|
4
|
+
uuid: import("zod").ZodGUID;
|
|
5
|
+
name: import("zod").ZodString;
|
|
6
|
+
description: import("zod").ZodString;
|
|
7
|
+
baseLanguage: import("zod").ZodObject<{
|
|
8
|
+
projectLanguageId: import("zod").ZodNumber;
|
|
9
|
+
languageId: import("zod").ZodNumber;
|
|
10
|
+
languageIso: import("zod").ZodString;
|
|
11
|
+
projectLanguageUuid: import("zod").ZodGUID;
|
|
12
12
|
}, import("zod/v4/core").$strip>;
|
|
13
|
-
targetLanguages: import("zod
|
|
14
|
-
projectLanguageId: import("zod
|
|
15
|
-
languageId: import("zod
|
|
16
|
-
languageIso: import("zod
|
|
17
|
-
projectLanguageUuid: import("zod
|
|
13
|
+
targetLanguages: import("zod").ZodArray<import("zod").ZodObject<{
|
|
14
|
+
projectLanguageId: import("zod").ZodNumber;
|
|
15
|
+
languageId: import("zod").ZodNumber;
|
|
16
|
+
languageIso: import("zod").ZodString;
|
|
17
|
+
projectLanguageUuid: import("zod").ZodGUID;
|
|
18
18
|
}, import("zod/v4/core").$strip>>;
|
|
19
|
-
translationSettings: import("zod
|
|
20
|
-
workflowType: import("zod
|
|
19
|
+
translationSettings: import("zod").ZodIntersection<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
20
|
+
workflowType: import("zod").ZodIntersection<import("zod").ZodEnum<{
|
|
21
21
|
readonly AI_ONLY: 'AI_ONLY';
|
|
22
22
|
readonly AI_HUMAN_REVIEW: 'AI_HUMAN_REVIEW';
|
|
23
|
-
}>, import("zod
|
|
24
|
-
reviewThreshold: import("zod
|
|
23
|
+
}>, import("zod").ZodLiteral<"AI_HUMAN_REVIEW">>;
|
|
24
|
+
reviewThreshold: import("zod").ZodEnum<{
|
|
25
25
|
readonly FULL_REVIEW: 'FULL_REVIEW';
|
|
26
26
|
readonly CRITICAL_MAJOR_MINOR: 'CRITICAL_MAJOR_MINOR';
|
|
27
27
|
readonly CRITICAL_MAJOR: 'CRITICAL_MAJOR';
|
|
28
28
|
readonly CRITICAL: 'CRITICAL';
|
|
29
29
|
}>;
|
|
30
|
-
}, import("zod/v4/core").$strip>, import("zod
|
|
31
|
-
workflowType: import("zod
|
|
30
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
31
|
+
workflowType: import("zod").ZodIntersection<import("zod").ZodEnum<{
|
|
32
32
|
readonly AI_ONLY: 'AI_ONLY';
|
|
33
33
|
readonly AI_HUMAN_REVIEW: 'AI_HUMAN_REVIEW';
|
|
34
|
-
}>, import("zod
|
|
35
|
-
reviewThreshold: import("zod
|
|
36
|
-
}, import("zod/v4/core").$strip>]>, import("zod
|
|
37
|
-
reviewTurnaroundDays: import("zod
|
|
34
|
+
}>, import("zod").ZodLiteral<"AI_ONLY">>;
|
|
35
|
+
reviewThreshold: import("zod").ZodNull;
|
|
36
|
+
}, import("zod/v4/core").$strip>]>, import("zod").ZodObject<{
|
|
37
|
+
reviewTurnaroundDays: import("zod").ZodNumber;
|
|
38
38
|
}, import("zod/v4/core").$strip>>;
|
|
39
|
-
contentSourceType: import("zod
|
|
40
|
-
contentSourceName: import("zod
|
|
41
|
-
projectType: import("zod
|
|
39
|
+
contentSourceType: import("zod").ZodNullable<import("zod").ZodString>;
|
|
40
|
+
contentSourceName: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
41
|
+
projectType: import("zod").ZodString;
|
|
42
42
|
}, import("zod/v4/core").$strip>;
|
|
43
|
-
}, import("zod/v4/core").$strip>, import("zod
|
|
44
|
-
workspaceId: import("zod
|
|
45
|
-
projectId: import("zod
|
|
46
|
-
}, import("zod/v4/core").$strip>, undefined, import("zod
|
|
47
|
-
authorization: import("zod
|
|
48
|
-
'content-type': import("zod
|
|
43
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
44
|
+
workspaceId: import("zod").ZodGUID;
|
|
45
|
+
projectId: import("zod").ZodGUID;
|
|
46
|
+
}, import("zod/v4/core").$strip>, undefined, import("zod").ZodObject<{
|
|
47
|
+
authorization: import("zod").ZodString;
|
|
48
|
+
'content-type': import("zod").ZodOptional<import("zod").ZodString>;
|
|
49
49
|
}, import("zod/v4/core").$strip>, undefined, false, false, undefined>;
|
|
50
|
-
export declare const patchProjectContract: import("@lokalise/api-contracts").PayloadRouteDefinition<import("zod
|
|
51
|
-
name: import("zod
|
|
52
|
-
description: import("zod
|
|
53
|
-
}, import("zod/v4/core").$strip>, import("zod
|
|
54
|
-
data: import("zod
|
|
55
|
-
projectId: import("zod
|
|
56
|
-
uuid: import("zod
|
|
57
|
-
name: import("zod
|
|
58
|
-
description: import("zod
|
|
59
|
-
baseLanguage: import("zod
|
|
60
|
-
projectLanguageId: import("zod
|
|
61
|
-
languageId: import("zod
|
|
62
|
-
languageIso: import("zod
|
|
63
|
-
projectLanguageUuid: import("zod
|
|
50
|
+
export declare const patchProjectContract: import("@lokalise/api-contracts").PayloadRouteDefinition<import("zod").ZodObject<{
|
|
51
|
+
name: import("zod").ZodString;
|
|
52
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
53
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
54
|
+
data: import("zod").ZodObject<{
|
|
55
|
+
projectId: import("zod").ZodString;
|
|
56
|
+
uuid: import("zod").ZodGUID;
|
|
57
|
+
name: import("zod").ZodString;
|
|
58
|
+
description: import("zod").ZodString;
|
|
59
|
+
baseLanguage: import("zod").ZodObject<{
|
|
60
|
+
projectLanguageId: import("zod").ZodNumber;
|
|
61
|
+
languageId: import("zod").ZodNumber;
|
|
62
|
+
languageIso: import("zod").ZodString;
|
|
63
|
+
projectLanguageUuid: import("zod").ZodGUID;
|
|
64
64
|
}, import("zod/v4/core").$strip>;
|
|
65
|
-
targetLanguages: import("zod
|
|
66
|
-
projectLanguageId: import("zod
|
|
67
|
-
languageId: import("zod
|
|
68
|
-
languageIso: import("zod
|
|
69
|
-
projectLanguageUuid: import("zod
|
|
65
|
+
targetLanguages: import("zod").ZodArray<import("zod").ZodObject<{
|
|
66
|
+
projectLanguageId: import("zod").ZodNumber;
|
|
67
|
+
languageId: import("zod").ZodNumber;
|
|
68
|
+
languageIso: import("zod").ZodString;
|
|
69
|
+
projectLanguageUuid: import("zod").ZodGUID;
|
|
70
70
|
}, import("zod/v4/core").$strip>>;
|
|
71
|
-
translationSettings: import("zod
|
|
72
|
-
workflowType: import("zod
|
|
71
|
+
translationSettings: import("zod").ZodIntersection<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
72
|
+
workflowType: import("zod").ZodIntersection<import("zod").ZodEnum<{
|
|
73
73
|
readonly AI_ONLY: 'AI_ONLY';
|
|
74
74
|
readonly AI_HUMAN_REVIEW: 'AI_HUMAN_REVIEW';
|
|
75
|
-
}>, import("zod
|
|
76
|
-
reviewThreshold: import("zod
|
|
75
|
+
}>, import("zod").ZodLiteral<"AI_HUMAN_REVIEW">>;
|
|
76
|
+
reviewThreshold: import("zod").ZodEnum<{
|
|
77
77
|
readonly FULL_REVIEW: 'FULL_REVIEW';
|
|
78
78
|
readonly CRITICAL_MAJOR_MINOR: 'CRITICAL_MAJOR_MINOR';
|
|
79
79
|
readonly CRITICAL_MAJOR: 'CRITICAL_MAJOR';
|
|
80
80
|
readonly CRITICAL: 'CRITICAL';
|
|
81
81
|
}>;
|
|
82
|
-
}, import("zod/v4/core").$strip>, import("zod
|
|
83
|
-
workflowType: import("zod
|
|
82
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
83
|
+
workflowType: import("zod").ZodIntersection<import("zod").ZodEnum<{
|
|
84
84
|
readonly AI_ONLY: 'AI_ONLY';
|
|
85
85
|
readonly AI_HUMAN_REVIEW: 'AI_HUMAN_REVIEW';
|
|
86
|
-
}>, import("zod
|
|
87
|
-
reviewThreshold: import("zod
|
|
88
|
-
}, import("zod/v4/core").$strip>]>, import("zod
|
|
89
|
-
reviewTurnaroundDays: import("zod
|
|
86
|
+
}>, import("zod").ZodLiteral<"AI_ONLY">>;
|
|
87
|
+
reviewThreshold: import("zod").ZodNull;
|
|
88
|
+
}, import("zod/v4/core").$strip>]>, import("zod").ZodObject<{
|
|
89
|
+
reviewTurnaroundDays: import("zod").ZodNumber;
|
|
90
90
|
}, import("zod/v4/core").$strip>>;
|
|
91
|
-
contentSourceType: import("zod
|
|
92
|
-
contentSourceName: import("zod
|
|
93
|
-
projectType: import("zod
|
|
91
|
+
contentSourceType: import("zod").ZodNullable<import("zod").ZodString>;
|
|
92
|
+
contentSourceName: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
93
|
+
projectType: import("zod").ZodString;
|
|
94
94
|
}, import("zod/v4/core").$strip>;
|
|
95
|
-
}, import("zod/v4/core").$strip>, import("zod
|
|
96
|
-
workspaceId: import("zod
|
|
97
|
-
projectId: import("zod
|
|
98
|
-
}, import("zod/v4/core").$strip>, undefined, import("zod
|
|
99
|
-
authorization: import("zod
|
|
100
|
-
'content-type': import("zod
|
|
95
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
96
|
+
workspaceId: import("zod").ZodGUID;
|
|
97
|
+
projectId: import("zod").ZodGUID;
|
|
98
|
+
}, import("zod/v4/core").$strip>, undefined, import("zod").ZodObject<{
|
|
99
|
+
authorization: import("zod").ZodString;
|
|
100
|
+
'content-type': import("zod").ZodOptional<import("zod").ZodString>;
|
|
101
101
|
}, import("zod/v4/core").$strip>, undefined, false, false, undefined>;
|
|
102
102
|
/**
|
|
103
103
|
* Public API router definition for getting the list of projects for a given workspace
|
|
104
|
+
*
|
|
105
|
+
* @deprecated Use `getProjectsContract` instead. This route puts a verb in the URL and returns an
|
|
106
|
+
* unpaginated list; both are replaced by `GET /v1/workspaces/{workspaceId}/projects`.
|
|
104
107
|
*/
|
|
105
|
-
export declare const getProjectsListContract: import("@lokalise/api-contracts").GetRouteDefinition<import("zod
|
|
106
|
-
data: import("zod
|
|
107
|
-
projects: import("zod
|
|
108
|
-
projectId: import("zod
|
|
109
|
-
uuid: import("zod
|
|
110
|
-
name: import("zod
|
|
111
|
-
description: import("zod
|
|
112
|
-
baseLanguage: import("zod
|
|
113
|
-
projectLanguageId: import("zod
|
|
114
|
-
languageId: import("zod
|
|
115
|
-
languageIso: import("zod
|
|
116
|
-
projectLanguageUuid: import("zod
|
|
108
|
+
export declare const getProjectsListContract: import("@lokalise/api-contracts").GetRouteDefinition<import("zod").ZodObject<{
|
|
109
|
+
data: import("zod").ZodObject<{
|
|
110
|
+
projects: import("zod").ZodArray<import("zod").ZodObject<{
|
|
111
|
+
projectId: import("zod").ZodString;
|
|
112
|
+
uuid: import("zod").ZodGUID;
|
|
113
|
+
name: import("zod").ZodString;
|
|
114
|
+
description: import("zod").ZodString;
|
|
115
|
+
baseLanguage: import("zod").ZodObject<{
|
|
116
|
+
projectLanguageId: import("zod").ZodNumber;
|
|
117
|
+
languageId: import("zod").ZodNumber;
|
|
118
|
+
languageIso: import("zod").ZodString;
|
|
119
|
+
projectLanguageUuid: import("zod").ZodGUID;
|
|
117
120
|
}, import("zod/v4/core").$strip>;
|
|
118
|
-
targetLanguages: import("zod
|
|
119
|
-
projectLanguageId: import("zod
|
|
120
|
-
languageId: import("zod
|
|
121
|
-
languageIso: import("zod
|
|
122
|
-
projectLanguageUuid: import("zod
|
|
121
|
+
targetLanguages: import("zod").ZodArray<import("zod").ZodObject<{
|
|
122
|
+
projectLanguageId: import("zod").ZodNumber;
|
|
123
|
+
languageId: import("zod").ZodNumber;
|
|
124
|
+
languageIso: import("zod").ZodString;
|
|
125
|
+
projectLanguageUuid: import("zod").ZodGUID;
|
|
123
126
|
}, import("zod/v4/core").$strip>>;
|
|
124
|
-
translationSettings: import("zod
|
|
125
|
-
workflowType: import("zod
|
|
127
|
+
translationSettings: import("zod").ZodIntersection<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
128
|
+
workflowType: import("zod").ZodIntersection<import("zod").ZodEnum<{
|
|
126
129
|
readonly AI_ONLY: 'AI_ONLY';
|
|
127
130
|
readonly AI_HUMAN_REVIEW: 'AI_HUMAN_REVIEW';
|
|
128
|
-
}>, import("zod
|
|
129
|
-
reviewThreshold: import("zod
|
|
131
|
+
}>, import("zod").ZodLiteral<"AI_HUMAN_REVIEW">>;
|
|
132
|
+
reviewThreshold: import("zod").ZodEnum<{
|
|
130
133
|
readonly FULL_REVIEW: 'FULL_REVIEW';
|
|
131
134
|
readonly CRITICAL_MAJOR_MINOR: 'CRITICAL_MAJOR_MINOR';
|
|
132
135
|
readonly CRITICAL_MAJOR: 'CRITICAL_MAJOR';
|
|
133
136
|
readonly CRITICAL: 'CRITICAL';
|
|
134
137
|
}>;
|
|
135
|
-
}, import("zod/v4/core").$strip>, import("zod
|
|
136
|
-
workflowType: import("zod
|
|
138
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
139
|
+
workflowType: import("zod").ZodIntersection<import("zod").ZodEnum<{
|
|
137
140
|
readonly AI_ONLY: 'AI_ONLY';
|
|
138
141
|
readonly AI_HUMAN_REVIEW: 'AI_HUMAN_REVIEW';
|
|
139
|
-
}>, import("zod
|
|
140
|
-
reviewThreshold: import("zod
|
|
141
|
-
}, import("zod/v4/core").$strip>]>, import("zod
|
|
142
|
-
reviewTurnaroundDays: import("zod
|
|
142
|
+
}>, import("zod").ZodLiteral<"AI_ONLY">>;
|
|
143
|
+
reviewThreshold: import("zod").ZodNull;
|
|
144
|
+
}, import("zod/v4/core").$strip>]>, import("zod").ZodObject<{
|
|
145
|
+
reviewTurnaroundDays: import("zod").ZodNumber;
|
|
143
146
|
}, import("zod/v4/core").$strip>>;
|
|
144
|
-
contentSourceType: import("zod
|
|
145
|
-
contentSourceName: import("zod
|
|
146
|
-
projectType: import("zod
|
|
147
|
+
contentSourceType: import("zod").ZodNullable<import("zod").ZodString>;
|
|
148
|
+
contentSourceName: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
149
|
+
projectType: import("zod").ZodString;
|
|
147
150
|
}, import("zod/v4/core").$strip>>;
|
|
148
151
|
}, import("zod/v4/core").$strip>;
|
|
149
|
-
meta: import("zod
|
|
150
|
-
count: import("zod
|
|
152
|
+
meta: import("zod").ZodObject<{
|
|
153
|
+
count: import("zod").ZodNumber;
|
|
151
154
|
}, import("zod/v4/core").$strip>;
|
|
152
|
-
}, import("zod/v4/core").$strip>, import("zod
|
|
153
|
-
workspaceId: import("zod
|
|
154
|
-
}, import("zod/v4/core").$strip>, undefined, import("zod
|
|
155
|
-
authorization: import("zod
|
|
156
|
-
'content-type': import("zod
|
|
155
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
156
|
+
workspaceId: import("zod").ZodGUID;
|
|
157
|
+
}, import("zod/v4/core").$strip>, undefined, import("zod").ZodObject<{
|
|
158
|
+
authorization: import("zod").ZodString;
|
|
159
|
+
'content-type': import("zod").ZodOptional<import("zod").ZodString>;
|
|
160
|
+
}, import("zod/v4/core").$strip>, undefined, false, false, undefined>;
|
|
161
|
+
/**
|
|
162
|
+
* Public API router definition for reading the projects collection of a workspace.
|
|
163
|
+
*
|
|
164
|
+
* Replaces `getProjectsListContract`: the path drops the `/list` verb so the collection and
|
|
165
|
+
* `GET .../projects/{projectId}` read as a collection/member pair, and the response is
|
|
166
|
+
* cursor-paginated, returning the cursor as `meta.cursor`.
|
|
167
|
+
*/
|
|
168
|
+
export declare const getProjectsContract: import("@lokalise/api-contracts").GetRouteDefinition<import("zod").ZodObject<{
|
|
169
|
+
data: import("zod").ZodArray<import("zod").ZodObject<{
|
|
170
|
+
projectId: import("zod").ZodString;
|
|
171
|
+
uuid: import("zod").ZodGUID;
|
|
172
|
+
name: import("zod").ZodString;
|
|
173
|
+
description: import("zod").ZodString;
|
|
174
|
+
baseLanguage: import("zod").ZodObject<{
|
|
175
|
+
projectLanguageId: import("zod").ZodNumber;
|
|
176
|
+
languageId: import("zod").ZodNumber;
|
|
177
|
+
languageIso: import("zod").ZodString;
|
|
178
|
+
projectLanguageUuid: import("zod").ZodGUID;
|
|
179
|
+
}, import("zod/v4/core").$strip>;
|
|
180
|
+
targetLanguages: import("zod").ZodArray<import("zod").ZodObject<{
|
|
181
|
+
projectLanguageId: import("zod").ZodNumber;
|
|
182
|
+
languageId: import("zod").ZodNumber;
|
|
183
|
+
languageIso: import("zod").ZodString;
|
|
184
|
+
projectLanguageUuid: import("zod").ZodGUID;
|
|
185
|
+
}, import("zod/v4/core").$strip>>;
|
|
186
|
+
translationSettings: import("zod").ZodIntersection<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
187
|
+
workflowType: import("zod").ZodIntersection<import("zod").ZodEnum<{
|
|
188
|
+
readonly AI_ONLY: 'AI_ONLY';
|
|
189
|
+
readonly AI_HUMAN_REVIEW: 'AI_HUMAN_REVIEW';
|
|
190
|
+
}>, import("zod").ZodLiteral<"AI_HUMAN_REVIEW">>;
|
|
191
|
+
reviewThreshold: import("zod").ZodEnum<{
|
|
192
|
+
readonly FULL_REVIEW: 'FULL_REVIEW';
|
|
193
|
+
readonly CRITICAL_MAJOR_MINOR: 'CRITICAL_MAJOR_MINOR';
|
|
194
|
+
readonly CRITICAL_MAJOR: 'CRITICAL_MAJOR';
|
|
195
|
+
readonly CRITICAL: 'CRITICAL';
|
|
196
|
+
}>;
|
|
197
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
198
|
+
workflowType: import("zod").ZodIntersection<import("zod").ZodEnum<{
|
|
199
|
+
readonly AI_ONLY: 'AI_ONLY';
|
|
200
|
+
readonly AI_HUMAN_REVIEW: 'AI_HUMAN_REVIEW';
|
|
201
|
+
}>, import("zod").ZodLiteral<"AI_ONLY">>;
|
|
202
|
+
reviewThreshold: import("zod").ZodNull;
|
|
203
|
+
}, import("zod/v4/core").$strip>]>, import("zod").ZodObject<{
|
|
204
|
+
reviewTurnaroundDays: import("zod").ZodNumber;
|
|
205
|
+
}, import("zod/v4/core").$strip>>;
|
|
206
|
+
contentSourceType: import("zod").ZodNullable<import("zod").ZodString>;
|
|
207
|
+
contentSourceName: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
208
|
+
projectType: import("zod").ZodString;
|
|
209
|
+
}, import("zod/v4/core").$strip>>;
|
|
210
|
+
meta: import("zod").ZodObject<{
|
|
211
|
+
count: import("zod").ZodNumber;
|
|
212
|
+
cursor: import("zod").ZodOptional<import("zod").ZodString>;
|
|
213
|
+
hasMore: import("zod").ZodBoolean;
|
|
214
|
+
}, import("zod/v4/core").$strip>;
|
|
215
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
216
|
+
workspaceId: import("zod").ZodGUID;
|
|
217
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
218
|
+
limit: import("zod").ZodDefault<import("zod").ZodCoercedNumber<unknown>>;
|
|
219
|
+
after: import("zod").ZodOptional<import("zod").ZodString>;
|
|
220
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
221
|
+
authorization: import("zod").ZodString;
|
|
222
|
+
'content-type': import("zod").ZodOptional<import("zod").ZodString>;
|
|
157
223
|
}, import("zod/v4/core").$strip>, undefined, false, false, undefined>;
|
|
158
224
|
/**
|
|
159
225
|
* Public API router definition for deleting a project within a workspace
|
|
160
226
|
*/
|
|
161
|
-
export declare const deleteProjectContract: import("@lokalise/api-contracts").DeleteRouteDefinition<import("zod
|
|
162
|
-
data: import("zod
|
|
163
|
-
projectId: import("zod
|
|
164
|
-
projectUuid: import("zod
|
|
165
|
-
projectDeleted: import("zod
|
|
227
|
+
export declare const deleteProjectContract: import("@lokalise/api-contracts").DeleteRouteDefinition<import("zod").ZodObject<{
|
|
228
|
+
data: import("zod").ZodObject<{
|
|
229
|
+
projectId: import("zod").ZodString;
|
|
230
|
+
projectUuid: import("zod").ZodGUID;
|
|
231
|
+
projectDeleted: import("zod").ZodBoolean;
|
|
166
232
|
}, import("zod/v4/core").$strip>;
|
|
167
|
-
}, import("zod/v4/core").$strip>, import("zod
|
|
168
|
-
workspaceId: import("zod
|
|
169
|
-
projectId: import("zod
|
|
170
|
-
}, import("zod/v4/core").$strip>, undefined, import("zod
|
|
171
|
-
authorization: import("zod
|
|
172
|
-
'content-type': import("zod
|
|
233
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
234
|
+
workspaceId: import("zod").ZodGUID;
|
|
235
|
+
projectId: import("zod").ZodGUID;
|
|
236
|
+
}, import("zod/v4/core").$strip>, undefined, import("zod").ZodObject<{
|
|
237
|
+
authorization: import("zod").ZodString;
|
|
238
|
+
'content-type': import("zod").ZodOptional<import("zod").ZodString>;
|
|
173
239
|
}, import("zod/v4/core").$strip>, undefined, false, false, undefined>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { buildRestContract } from '@lokalise/api-contracts';
|
|
2
2
|
import { AUTH_HEADERS } from '../schemas/domainSchemas.js';
|
|
3
|
-
import { DELETE_PROJECT_PATH_PARAMS_SCHEMA, DELETE_PROJECT_SUCCESS_RESPONSE_BODY, GET_PROJECT_PATH_PARAMS_SCHEMA, GET_PROJECT_SUCCESS_RESPONSE_BODY, GET_PROJECTS_LIST_PATH_PARAMS_SCHEMA, GET_PROJECTS_LIST_SUCCESS_RESPONSE_BODY, PATCH_PROJECT_PATH_PARAMS_SCHEMA, PATCH_PROJECT_REQUEST_BODY_SCHEMA, PATCH_PROJECT_SUCCESS_RESPONSE_BODY, } from '../schemas/projectSchemas.js';
|
|
3
|
+
import { DELETE_PROJECT_PATH_PARAMS_SCHEMA, DELETE_PROJECT_SUCCESS_RESPONSE_BODY, GET_PROJECT_PATH_PARAMS_SCHEMA, GET_PROJECT_SUCCESS_RESPONSE_BODY, GET_PROJECTS_LIST_PATH_PARAMS_SCHEMA, GET_PROJECTS_LIST_SUCCESS_RESPONSE_BODY, GET_PROJECTS_PATH_PARAMS_SCHEMA, GET_PROJECTS_QUERY_SCHEMA, GET_PROJECTS_SUCCESS_RESPONSE_BODY, PATCH_PROJECT_PATH_PARAMS_SCHEMA, PATCH_PROJECT_REQUEST_BODY_SCHEMA, PATCH_PROJECT_SUCCESS_RESPONSE_BODY, } from '../schemas/projectSchemas.js';
|
|
4
4
|
export const getProjectContract = buildRestContract({
|
|
5
5
|
method: 'get',
|
|
6
6
|
pathResolver: (params) => `/v1/workspaces/${params.workspaceId}/projects/${params.projectId}`,
|
|
@@ -20,15 +20,34 @@ export const patchProjectContract = buildRestContract({
|
|
|
20
20
|
});
|
|
21
21
|
/**
|
|
22
22
|
* Public API router definition for getting the list of projects for a given workspace
|
|
23
|
+
*
|
|
24
|
+
* @deprecated Use `getProjectsContract` instead. This route puts a verb in the URL and returns an
|
|
25
|
+
* unpaginated list; both are replaced by `GET /v1/workspaces/{workspaceId}/projects`.
|
|
23
26
|
*/
|
|
24
27
|
export const getProjectsListContract = buildRestContract({
|
|
25
28
|
method: 'get',
|
|
26
29
|
pathResolver: (params) => `/v1/workspaces/${params.workspaceId}/projects/list`,
|
|
27
|
-
description: 'Get projects list',
|
|
30
|
+
description: 'Get projects list (deprecated, use GET /v1/workspaces/{workspaceId}/projects)',
|
|
28
31
|
requestHeaderSchema: AUTH_HEADERS,
|
|
29
32
|
requestPathParamsSchema: GET_PROJECTS_LIST_PATH_PARAMS_SCHEMA,
|
|
30
33
|
successResponseBodySchema: GET_PROJECTS_LIST_SUCCESS_RESPONSE_BODY,
|
|
31
34
|
});
|
|
35
|
+
/**
|
|
36
|
+
* Public API router definition for reading the projects collection of a workspace.
|
|
37
|
+
*
|
|
38
|
+
* Replaces `getProjectsListContract`: the path drops the `/list` verb so the collection and
|
|
39
|
+
* `GET .../projects/{projectId}` read as a collection/member pair, and the response is
|
|
40
|
+
* cursor-paginated, returning the cursor as `meta.cursor`.
|
|
41
|
+
*/
|
|
42
|
+
export const getProjectsContract = buildRestContract({
|
|
43
|
+
method: 'get',
|
|
44
|
+
pathResolver: (params) => `/v1/workspaces/${params.workspaceId}/projects`,
|
|
45
|
+
description: 'Get projects',
|
|
46
|
+
requestHeaderSchema: AUTH_HEADERS,
|
|
47
|
+
requestPathParamsSchema: GET_PROJECTS_PATH_PARAMS_SCHEMA,
|
|
48
|
+
requestQuerySchema: GET_PROJECTS_QUERY_SCHEMA,
|
|
49
|
+
successResponseBodySchema: GET_PROJECTS_SUCCESS_RESPONSE_BODY,
|
|
50
|
+
});
|
|
32
51
|
/**
|
|
33
52
|
* Public API router definition for deleting a project within a workspace
|
|
34
53
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projectsContracts.js","sourceRoot":"","sources":["../../src/apiContracts/projectsContracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC1D,OAAO,EACL,iCAAiC,EACjC,oCAAoC,EACpC,8BAA8B,EAC9B,iCAAiC,EACjC,oCAAoC,EACpC,uCAAuC,EACvC,gCAAgC,EAChC,iCAAiC,EACjC,mCAAmC,GACpC,MAAM,8BAA8B,CAAA;AAErC,MAAM,CAAC,MAAM,kBAAkB,GAAG,iBAAiB,CAAC;IAClD,MAAM,EAAE,KAAK;IACb,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,kBAAkB,MAAM,CAAC,WAAW,aAAa,MAAM,CAAC,SAAS,EAAE;IAC7F,WAAW,EAAE,mBAAmB;IAChC,mBAAmB,EAAE,YAAY;IACjC,uBAAuB,EAAE,8BAA8B;IACvD,yBAAyB,EAAE,iCAAiC;CAC7D,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;IACpD,MAAM,EAAE,OAAO;IACf,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,kBAAkB,MAAM,CAAC,WAAW,aAAa,MAAM,CAAC,SAAS,EAAE;IAC7F,WAAW,EAAE,uBAAuB;IACpC,mBAAmB,EAAE,YAAY;IACjC,uBAAuB,EAAE,gCAAgC;IACzD,iBAAiB,EAAE,iCAAiC;IACpD,yBAAyB,EAAE,mCAAmC;CAC/D,CAAC,CAAA;AAEF
|
|
1
|
+
{"version":3,"file":"projectsContracts.js","sourceRoot":"","sources":["../../src/apiContracts/projectsContracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC1D,OAAO,EACL,iCAAiC,EACjC,oCAAoC,EACpC,8BAA8B,EAC9B,iCAAiC,EACjC,oCAAoC,EACpC,uCAAuC,EACvC,+BAA+B,EAC/B,yBAAyB,EACzB,kCAAkC,EAClC,gCAAgC,EAChC,iCAAiC,EACjC,mCAAmC,GACpC,MAAM,8BAA8B,CAAA;AAErC,MAAM,CAAC,MAAM,kBAAkB,GAAG,iBAAiB,CAAC;IAClD,MAAM,EAAE,KAAK;IACb,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,kBAAkB,MAAM,CAAC,WAAW,aAAa,MAAM,CAAC,SAAS,EAAE;IAC7F,WAAW,EAAE,mBAAmB;IAChC,mBAAmB,EAAE,YAAY;IACjC,uBAAuB,EAAE,8BAA8B;IACvD,yBAAyB,EAAE,iCAAiC;CAC7D,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;IACpD,MAAM,EAAE,OAAO;IACf,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,kBAAkB,MAAM,CAAC,WAAW,aAAa,MAAM,CAAC,SAAS,EAAE;IAC7F,WAAW,EAAE,uBAAuB;IACpC,mBAAmB,EAAE,YAAY;IACjC,uBAAuB,EAAE,gCAAgC;IACzD,iBAAiB,EAAE,iCAAiC;IACpD,yBAAyB,EAAE,mCAAmC;CAC/D,CAAC,CAAA;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,iBAAiB,CAAC;IACvD,MAAM,EAAE,KAAK;IACb,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,kBAAkB,MAAM,CAAC,WAAW,gBAAgB;IAC9E,WAAW,EAAE,+EAA+E;IAC5F,mBAAmB,EAAE,YAAY;IACjC,uBAAuB,EAAE,oCAAoC;IAC7D,yBAAyB,EAAE,uCAAuC;CACnE,CAAC,CAAA;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;IACnD,MAAM,EAAE,KAAK;IACb,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,kBAAkB,MAAM,CAAC,WAAW,WAAW;IACzE,WAAW,EAAE,cAAc;IAC3B,mBAAmB,EAAE,YAAY;IACjC,uBAAuB,EAAE,+BAA+B;IACxD,kBAAkB,EAAE,yBAAyB;IAC7C,yBAAyB,EAAE,kCAAkC;CAC9D,CAAC,CAAA;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;IACrD,MAAM,EAAE,QAAQ;IAChB,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,kBAAkB,MAAM,CAAC,WAAW,aAAa,MAAM,CAAC,SAAS,EAAE;IAC7F,WAAW,EAAE,kBAAkB;IAC/B,mBAAmB,EAAE,YAAY;IACjC,uBAAuB,EAAE,iCAAiC;IAC1D,yBAAyB,EAAE,oCAAoC;IAC/D,uBAAuB,EAAE,KAAK;CAC/B,CAAC,CAAA"}
|
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
export declare const getTranslationSettingsContract: import("@lokalise/api-contracts").GetRouteDefinition<import("zod
|
|
2
|
-
data: import("zod
|
|
3
|
-
workflowType: import("zod
|
|
1
|
+
export declare const getTranslationSettingsContract: import("@lokalise/api-contracts").GetRouteDefinition<import("zod").ZodObject<{
|
|
2
|
+
data: import("zod").ZodIntersection<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
3
|
+
workflowType: import("zod").ZodIntersection<import("zod").ZodEnum<{
|
|
4
4
|
readonly AI_ONLY: 'AI_ONLY';
|
|
5
5
|
readonly AI_HUMAN_REVIEW: 'AI_HUMAN_REVIEW';
|
|
6
|
-
}>, import("zod
|
|
7
|
-
reviewThreshold: import("zod
|
|
6
|
+
}>, import("zod").ZodLiteral<"AI_HUMAN_REVIEW">>;
|
|
7
|
+
reviewThreshold: import("zod").ZodEnum<{
|
|
8
8
|
readonly FULL_REVIEW: 'FULL_REVIEW';
|
|
9
9
|
readonly CRITICAL_MAJOR_MINOR: 'CRITICAL_MAJOR_MINOR';
|
|
10
10
|
readonly CRITICAL_MAJOR: 'CRITICAL_MAJOR';
|
|
11
11
|
readonly CRITICAL: 'CRITICAL';
|
|
12
12
|
}>;
|
|
13
|
-
}, import("zod/v4/core").$strip>, import("zod
|
|
14
|
-
workflowType: import("zod
|
|
13
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
14
|
+
workflowType: import("zod").ZodIntersection<import("zod").ZodEnum<{
|
|
15
15
|
readonly AI_ONLY: 'AI_ONLY';
|
|
16
16
|
readonly AI_HUMAN_REVIEW: 'AI_HUMAN_REVIEW';
|
|
17
|
-
}>, import("zod
|
|
18
|
-
reviewThreshold: import("zod
|
|
19
|
-
}, import("zod/v4/core").$strip>]>, import("zod
|
|
20
|
-
reviewTurnaroundDays: import("zod
|
|
17
|
+
}>, import("zod").ZodLiteral<"AI_ONLY">>;
|
|
18
|
+
reviewThreshold: import("zod").ZodNull;
|
|
19
|
+
}, import("zod/v4/core").$strip>]>, import("zod").ZodObject<{
|
|
20
|
+
reviewTurnaroundDays: import("zod").ZodNumber;
|
|
21
21
|
}, import("zod/v4/core").$strip>>;
|
|
22
|
-
}, import("zod/v4/core").$strip>, import("zod
|
|
23
|
-
workspaceId: import("zod
|
|
24
|
-
projectId: import("zod
|
|
25
|
-
}, import("zod/v4/core").$strip>, undefined, import("zod
|
|
26
|
-
authorization: import("zod
|
|
27
|
-
'content-type': import("zod
|
|
22
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
23
|
+
workspaceId: import("zod").ZodGUID;
|
|
24
|
+
projectId: import("zod").ZodGUID;
|
|
25
|
+
}, import("zod/v4/core").$strip>, undefined, import("zod").ZodObject<{
|
|
26
|
+
authorization: import("zod").ZodString;
|
|
27
|
+
'content-type': import("zod").ZodOptional<import("zod").ZodString>;
|
|
28
28
|
}, import("zod/v4/core").$strip>, undefined, false, false, undefined>;
|
|
29
|
-
export declare const putTranslationSettingsContract: import("@lokalise/api-contracts").PayloadRouteDefinition<import("zod
|
|
30
|
-
workflowType: import("zod
|
|
29
|
+
export declare const putTranslationSettingsContract: import("@lokalise/api-contracts").PayloadRouteDefinition<import("zod").ZodIntersection<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
30
|
+
workflowType: import("zod").ZodIntersection<import("zod").ZodEnum<{
|
|
31
31
|
readonly AI_ONLY: 'AI_ONLY';
|
|
32
32
|
readonly AI_HUMAN_REVIEW: 'AI_HUMAN_REVIEW';
|
|
33
|
-
}>, import("zod
|
|
34
|
-
reviewThreshold: import("zod
|
|
33
|
+
}>, import("zod").ZodLiteral<"AI_HUMAN_REVIEW">>;
|
|
34
|
+
reviewThreshold: import("zod").ZodEnum<{
|
|
35
35
|
readonly FULL_REVIEW: 'FULL_REVIEW';
|
|
36
36
|
readonly CRITICAL_MAJOR_MINOR: 'CRITICAL_MAJOR_MINOR';
|
|
37
37
|
readonly CRITICAL_MAJOR: 'CRITICAL_MAJOR';
|
|
38
38
|
readonly CRITICAL: 'CRITICAL';
|
|
39
39
|
}>;
|
|
40
|
-
}, import("zod/v4/core").$strip>, import("zod
|
|
41
|
-
workflowType: import("zod
|
|
40
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
41
|
+
workflowType: import("zod").ZodIntersection<import("zod").ZodEnum<{
|
|
42
42
|
readonly AI_ONLY: 'AI_ONLY';
|
|
43
43
|
readonly AI_HUMAN_REVIEW: 'AI_HUMAN_REVIEW';
|
|
44
|
-
}>, import("zod
|
|
45
|
-
reviewThreshold: import("zod
|
|
46
|
-
}, import("zod/v4/core").$strip>]>, import("zod
|
|
47
|
-
reviewTurnaroundDays: import("zod
|
|
48
|
-
}, import("zod/v4/core").$strip>>, import("zod
|
|
49
|
-
data: import("zod
|
|
50
|
-
workflowType: import("zod
|
|
44
|
+
}>, import("zod").ZodLiteral<"AI_ONLY">>;
|
|
45
|
+
reviewThreshold: import("zod").ZodNull;
|
|
46
|
+
}, import("zod/v4/core").$strip>]>, import("zod").ZodObject<{
|
|
47
|
+
reviewTurnaroundDays: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
48
|
+
}, import("zod/v4/core").$strip>>, import("zod").ZodObject<{
|
|
49
|
+
data: import("zod").ZodIntersection<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
50
|
+
workflowType: import("zod").ZodIntersection<import("zod").ZodEnum<{
|
|
51
51
|
readonly AI_ONLY: 'AI_ONLY';
|
|
52
52
|
readonly AI_HUMAN_REVIEW: 'AI_HUMAN_REVIEW';
|
|
53
|
-
}>, import("zod
|
|
54
|
-
reviewThreshold: import("zod
|
|
53
|
+
}>, import("zod").ZodLiteral<"AI_HUMAN_REVIEW">>;
|
|
54
|
+
reviewThreshold: import("zod").ZodEnum<{
|
|
55
55
|
readonly FULL_REVIEW: 'FULL_REVIEW';
|
|
56
56
|
readonly CRITICAL_MAJOR_MINOR: 'CRITICAL_MAJOR_MINOR';
|
|
57
57
|
readonly CRITICAL_MAJOR: 'CRITICAL_MAJOR';
|
|
58
58
|
readonly CRITICAL: 'CRITICAL';
|
|
59
59
|
}>;
|
|
60
|
-
}, import("zod/v4/core").$strip>, import("zod
|
|
61
|
-
workflowType: import("zod
|
|
60
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
61
|
+
workflowType: import("zod").ZodIntersection<import("zod").ZodEnum<{
|
|
62
62
|
readonly AI_ONLY: 'AI_ONLY';
|
|
63
63
|
readonly AI_HUMAN_REVIEW: 'AI_HUMAN_REVIEW';
|
|
64
|
-
}>, import("zod
|
|
65
|
-
reviewThreshold: import("zod
|
|
66
|
-
}, import("zod/v4/core").$strip>]>, import("zod
|
|
67
|
-
reviewTurnaroundDays: import("zod
|
|
64
|
+
}>, import("zod").ZodLiteral<"AI_ONLY">>;
|
|
65
|
+
reviewThreshold: import("zod").ZodNull;
|
|
66
|
+
}, import("zod/v4/core").$strip>]>, import("zod").ZodObject<{
|
|
67
|
+
reviewTurnaroundDays: import("zod").ZodNumber;
|
|
68
68
|
}, import("zod/v4/core").$strip>>;
|
|
69
|
-
}, import("zod/v4/core").$strip>, import("zod
|
|
70
|
-
workspaceId: import("zod
|
|
71
|
-
projectId: import("zod
|
|
72
|
-
}, import("zod/v4/core").$strip>, undefined, import("zod
|
|
73
|
-
authorization: import("zod
|
|
74
|
-
'content-type': import("zod
|
|
69
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
70
|
+
workspaceId: import("zod").ZodGUID;
|
|
71
|
+
projectId: import("zod").ZodGUID;
|
|
72
|
+
}, import("zod/v4/core").$strip>, undefined, import("zod").ZodObject<{
|
|
73
|
+
authorization: import("zod").ZodString;
|
|
74
|
+
'content-type': import("zod").ZodOptional<import("zod").ZodString>;
|
|
75
75
|
}, import("zod/v4/core").$strip>, undefined, false, false, undefined>;
|
|
@@ -56,6 +56,92 @@ export declare const GET_PROJECTS_LIST_SUCCESS_RESPONSE_BODY: z.ZodObject<{
|
|
|
56
56
|
}, z.core.$strip>;
|
|
57
57
|
}, z.core.$strip>;
|
|
58
58
|
export type GetProjectsListSuccessResponse = z.infer<typeof GET_PROJECTS_LIST_SUCCESS_RESPONSE_BODY>;
|
|
59
|
+
export declare const GET_PROJECTS_PATH_PARAMS_SCHEMA: z.ZodObject<{
|
|
60
|
+
workspaceId: z.ZodGUID;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
export type GetProjectsPathParams = z.infer<typeof GET_PROJECTS_PATH_PARAMS_SCHEMA>;
|
|
63
|
+
/**
|
|
64
|
+
* Page size defaults are service-defined (API Governance 5.1). The maximum is far below Expert's
|
|
65
|
+
* own 5000 because every page is enriched with translation settings and content-source
|
|
66
|
+
* integrations, so page size drives fan-out here, not just response size.
|
|
67
|
+
*
|
|
68
|
+
* The ceiling is not a judgement call: it is derived from `MAX_BATCH_PROJECT_IDS`, the hard cap
|
|
69
|
+
* Content Type App Engine enforces on `postRetrieveBatchIntegrationsContract`. Enrichment sends
|
|
70
|
+
* every `marketing_integrations` project on the page to CTAE in a single batch and does not chunk,
|
|
71
|
+
* so a larger page would be rejected upstream. That failure is silent rather than loud - the
|
|
72
|
+
* rejection is caught, the page is served with `contentSourceType: null` on every project, and it
|
|
73
|
+
* is never cached, so the fan-out repeats on every request. Deriving the constant means PE follows
|
|
74
|
+
* CTAE automatically instead of drifting into that state if the upstream cap ever changes.
|
|
75
|
+
*
|
|
76
|
+
* Raising the page size beyond this therefore requires chunking the CTAE calls first, and deciding
|
|
77
|
+
* whether one failed chunk degrades that chunk or the whole page.
|
|
78
|
+
*/
|
|
79
|
+
export declare const PROJECTS_DEFAULT_LIMIT = 100;
|
|
80
|
+
export declare const PROJECTS_MAX_LIMIT = 100;
|
|
81
|
+
/**
|
|
82
|
+
* Request window, shaped after `AFTER_PAGINATION_CONFIG_SCHEMA` from `@lokalise/api-common`:
|
|
83
|
+
* `after` only, since Expert hands back a next cursor and no previous one, so this collection is
|
|
84
|
+
* forward-only. Bounds and the default are applied on top of the shared shape.
|
|
85
|
+
*/
|
|
86
|
+
export declare const GET_PROJECTS_QUERY_SCHEMA: z.ZodObject<{
|
|
87
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
88
|
+
after: z.ZodOptional<z.ZodString>;
|
|
89
|
+
}, z.core.$strip>;
|
|
90
|
+
export type GetProjectsQuery = z.infer<typeof GET_PROJECTS_QUERY_SCHEMA>;
|
|
91
|
+
/**
|
|
92
|
+
* Uses the canonical `paginatedResponseSchema` from `@lokalise/api-common` so the envelope is
|
|
93
|
+
* identical to the other Lokalise services: `data` is a bare array and everything that is not
|
|
94
|
+
* response data lives under `meta`, with `meta.cursor` absent once the collection is exhausted.
|
|
95
|
+
*/
|
|
96
|
+
export declare const GET_PROJECTS_SUCCESS_RESPONSE_BODY: z.ZodObject<{
|
|
97
|
+
data: z.ZodArray<z.ZodObject<{
|
|
98
|
+
projectId: z.ZodString;
|
|
99
|
+
uuid: z.ZodGUID;
|
|
100
|
+
name: z.ZodString;
|
|
101
|
+
description: z.ZodString;
|
|
102
|
+
baseLanguage: z.ZodObject<{
|
|
103
|
+
projectLanguageId: z.ZodNumber;
|
|
104
|
+
languageId: z.ZodNumber;
|
|
105
|
+
languageIso: z.ZodString;
|
|
106
|
+
projectLanguageUuid: z.ZodGUID;
|
|
107
|
+
}, z.core.$strip>;
|
|
108
|
+
targetLanguages: z.ZodArray<z.ZodObject<{
|
|
109
|
+
projectLanguageId: z.ZodNumber;
|
|
110
|
+
languageId: z.ZodNumber;
|
|
111
|
+
languageIso: z.ZodString;
|
|
112
|
+
projectLanguageUuid: z.ZodGUID;
|
|
113
|
+
}, z.core.$strip>>;
|
|
114
|
+
translationSettings: z.ZodIntersection<z.ZodUnion<readonly [z.ZodObject<{
|
|
115
|
+
workflowType: z.ZodIntersection<z.ZodEnum<{
|
|
116
|
+
readonly AI_ONLY: 'AI_ONLY';
|
|
117
|
+
readonly AI_HUMAN_REVIEW: 'AI_HUMAN_REVIEW';
|
|
118
|
+
}>, z.ZodLiteral<"AI_HUMAN_REVIEW">>;
|
|
119
|
+
reviewThreshold: z.ZodEnum<{
|
|
120
|
+
readonly FULL_REVIEW: 'FULL_REVIEW';
|
|
121
|
+
readonly CRITICAL_MAJOR_MINOR: 'CRITICAL_MAJOR_MINOR';
|
|
122
|
+
readonly CRITICAL_MAJOR: 'CRITICAL_MAJOR';
|
|
123
|
+
readonly CRITICAL: 'CRITICAL';
|
|
124
|
+
}>;
|
|
125
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
126
|
+
workflowType: z.ZodIntersection<z.ZodEnum<{
|
|
127
|
+
readonly AI_ONLY: 'AI_ONLY';
|
|
128
|
+
readonly AI_HUMAN_REVIEW: 'AI_HUMAN_REVIEW';
|
|
129
|
+
}>, z.ZodLiteral<"AI_ONLY">>;
|
|
130
|
+
reviewThreshold: z.ZodNull;
|
|
131
|
+
}, z.core.$strip>]>, z.ZodObject<{
|
|
132
|
+
reviewTurnaroundDays: z.ZodNumber;
|
|
133
|
+
}, z.core.$strip>>;
|
|
134
|
+
contentSourceType: z.ZodNullable<z.ZodString>;
|
|
135
|
+
contentSourceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
136
|
+
projectType: z.ZodString;
|
|
137
|
+
}, z.core.$strip>>;
|
|
138
|
+
meta: z.ZodObject<{
|
|
139
|
+
count: z.ZodNumber;
|
|
140
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
141
|
+
hasMore: z.ZodBoolean;
|
|
142
|
+
}, z.core.$strip>;
|
|
143
|
+
}, z.core.$strip>;
|
|
144
|
+
export type GetProjectsSuccessResponse = z.infer<typeof GET_PROJECTS_SUCCESS_RESPONSE_BODY>;
|
|
59
145
|
export declare const GET_PROJECT_PATH_PARAMS_SCHEMA: z.ZodObject<{
|
|
60
146
|
workspaceId: z.ZodGUID;
|
|
61
147
|
projectId: z.ZodGUID;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { paginatedResponseSchema } from '@lokalise/api-common';
|
|
2
|
+
import { MAX_BATCH_PROJECT_IDS } from '@lokalise/content-type-app-engine-contracts';
|
|
1
3
|
import { z } from 'zod/v4';
|
|
2
4
|
import { PROJECT_SCHEMA } from './domainSchemas.js';
|
|
3
5
|
import { PROJECT_PATH_PARAMS_SCHEMA, WORKSPACE_ONLY_PATH_PARAMS_SCHEMA, } from './pathParamsSchemas.js';
|
|
4
|
-
// GET PROJECTS LIST
|
|
6
|
+
// GET PROJECTS LIST (deprecated, superseded by GET PROJECTS below)
|
|
5
7
|
export const GET_PROJECTS_LIST_PATH_PARAMS_SCHEMA = WORKSPACE_ONLY_PATH_PARAMS_SCHEMA;
|
|
6
8
|
export const PROJECTS_LIST_RESPONSE_META_SCHEMA = z.object({
|
|
7
9
|
count: z.number().int().nonnegative(),
|
|
@@ -10,6 +12,51 @@ export const GET_PROJECTS_LIST_SUCCESS_RESPONSE_BODY = z.object({
|
|
|
10
12
|
data: z.object({ projects: z.array(PROJECT_SCHEMA) }),
|
|
11
13
|
meta: PROJECTS_LIST_RESPONSE_META_SCHEMA,
|
|
12
14
|
});
|
|
15
|
+
// GET PROJECTS (cursor-paginated collection read)
|
|
16
|
+
export const GET_PROJECTS_PATH_PARAMS_SCHEMA = WORKSPACE_ONLY_PATH_PARAMS_SCHEMA;
|
|
17
|
+
/**
|
|
18
|
+
* Page size defaults are service-defined (API Governance 5.1). The maximum is far below Expert's
|
|
19
|
+
* own 5000 because every page is enriched with translation settings and content-source
|
|
20
|
+
* integrations, so page size drives fan-out here, not just response size.
|
|
21
|
+
*
|
|
22
|
+
* The ceiling is not a judgement call: it is derived from `MAX_BATCH_PROJECT_IDS`, the hard cap
|
|
23
|
+
* Content Type App Engine enforces on `postRetrieveBatchIntegrationsContract`. Enrichment sends
|
|
24
|
+
* every `marketing_integrations` project on the page to CTAE in a single batch and does not chunk,
|
|
25
|
+
* so a larger page would be rejected upstream. That failure is silent rather than loud - the
|
|
26
|
+
* rejection is caught, the page is served with `contentSourceType: null` on every project, and it
|
|
27
|
+
* is never cached, so the fan-out repeats on every request. Deriving the constant means PE follows
|
|
28
|
+
* CTAE automatically instead of drifting into that state if the upstream cap ever changes.
|
|
29
|
+
*
|
|
30
|
+
* Raising the page size beyond this therefore requires chunking the CTAE calls first, and deciding
|
|
31
|
+
* whether one failed chunk degrades that chunk or the whole page.
|
|
32
|
+
*/
|
|
33
|
+
export const PROJECTS_DEFAULT_LIMIT = 100;
|
|
34
|
+
export const PROJECTS_MAX_LIMIT = MAX_BATCH_PROJECT_IDS;
|
|
35
|
+
/**
|
|
36
|
+
* Request window, shaped after `AFTER_PAGINATION_CONFIG_SCHEMA` from `@lokalise/api-common`:
|
|
37
|
+
* `after` only, since Expert hands back a next cursor and no previous one, so this collection is
|
|
38
|
+
* forward-only. Bounds and the default are applied on top of the shared shape.
|
|
39
|
+
*/
|
|
40
|
+
export const GET_PROJECTS_QUERY_SCHEMA = z.object({
|
|
41
|
+
limit: z.coerce
|
|
42
|
+
.number()
|
|
43
|
+
.int()
|
|
44
|
+
.min(1)
|
|
45
|
+
.max(PROJECTS_MAX_LIMIT)
|
|
46
|
+
.default(PROJECTS_DEFAULT_LIMIT)
|
|
47
|
+
.describe('Number of projects to return per page'),
|
|
48
|
+
after: z
|
|
49
|
+
.string()
|
|
50
|
+
.min(1)
|
|
51
|
+
.optional()
|
|
52
|
+
.describe('Opaque cursor from the previous response `meta.cursor`. Omit to read the first page'),
|
|
53
|
+
});
|
|
54
|
+
/**
|
|
55
|
+
* Uses the canonical `paginatedResponseSchema` from `@lokalise/api-common` so the envelope is
|
|
56
|
+
* identical to the other Lokalise services: `data` is a bare array and everything that is not
|
|
57
|
+
* response data lives under `meta`, with `meta.cursor` absent once the collection is exhausted.
|
|
58
|
+
*/
|
|
59
|
+
export const GET_PROJECTS_SUCCESS_RESPONSE_BODY = paginatedResponseSchema(PROJECT_SCHEMA);
|
|
13
60
|
// GET PROJECT
|
|
14
61
|
export const GET_PROJECT_PATH_PARAMS_SCHEMA = PROJECT_PATH_PARAMS_SCHEMA;
|
|
15
62
|
export const GET_PROJECT_SUCCESS_RESPONSE_BODY = z.object({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projectSchemas.js","sourceRoot":"","sources":["../../src/schemas/projectSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EACL,0BAA0B,EAC1B,iCAAiC,GAClC,MAAM,wBAAwB,CAAA;AAE/B,
|
|
1
|
+
{"version":3,"file":"projectSchemas.js","sourceRoot":"","sources":["../../src/schemas/projectSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAA;AACnF,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EACL,0BAA0B,EAC1B,iCAAiC,GAClC,MAAM,wBAAwB,CAAA;AAE/B,mEAAmE;AACnE,MAAM,CAAC,MAAM,oCAAoC,GAAG,iCAAiC,CAAA;AAGrF,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC,MAAM,CAAC;IACzD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;CACtC,CAAC,CAAA;AAGF,MAAM,CAAC,MAAM,uCAAuC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9D,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE,CAAC;IACrD,IAAI,EAAE,kCAAkC;CACzC,CAAC,CAAA;AAGF,kDAAkD;AAClD,MAAM,CAAC,MAAM,+BAA+B,GAAG,iCAAiC,CAAA;AAGhF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAA;AACzC,MAAM,CAAC,MAAM,kBAAkB,GAAG,qBAAqB,CAAA;AAEvD;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,KAAK,EAAE,CAAC,CAAC,MAAM;SACZ,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,kBAAkB,CAAC;SACvB,OAAO,CAAC,sBAAsB,CAAC;SAC/B,QAAQ,CAAC,uCAAuC,CAAC;IACpD,KAAK,EAAE,CAAC;SACL,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,EAAE;SACV,QAAQ,CACP,qFAAqF,CACtF;CACJ,CAAC,CAAA;AAGF;;;;GAIG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG,uBAAuB,CAAC,cAAc,CAAC,CAAA;AAGzF,cAAc;AACd,MAAM,CAAC,MAAM,8BAA8B,GAAG,0BAA0B,CAAA;AAGxE,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,MAAM,CAAC;IACxD,IAAI,EAAE,cAAc;CACrB,CAAC,CAAA;AAGF,gBAAgB;AAChB,MAAM,CAAC,MAAM,gCAAgC,GAAG,0BAA0B,CAAA;AAG1E,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,MAAM,CAAC;IACxD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACnC,CAAC,CAAA;AAGF,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1D,IAAI,EAAE,cAAc;CACrB,CAAC,CAAA;AAGF,iBAAiB;AACjB,MAAM,CAAC,MAAM,iCAAiC,GAAG,0BAA0B,CAAA;AAG3E,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3D,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;QACb,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;QACrB,WAAW,EAAE,CAAC,CAAC,IAAI,EAAE;QACrB,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE;KAC5B,CAAC;CACH,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lokalise/projects-engine-contracts",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.1.0",
|
|
4
4
|
"description": "API contracts and shared schemas for the Projects Engine service",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"url": "git+https://github.com/lokalise/projects-engine.git"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
+
"@lokalise/api-common": "^7.1.1",
|
|
33
34
|
"@lokalise/api-contracts": "^7.0.0",
|
|
34
35
|
"@lokalise/content-type-app-engine-contracts": "^5.15.1",
|
|
35
36
|
"@lokalise/translation-storage-api-schemas": ">=16.1.0"
|
|
@@ -38,7 +39,7 @@
|
|
|
38
39
|
"zod": "^4.0.0"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
41
|
-
"@biomejs/biome": "2.5.
|
|
42
|
+
"@biomejs/biome": "2.5.7",
|
|
42
43
|
"@lokalise/biome-config": "^3.1.1",
|
|
43
44
|
"@lokalise/id-utils": "^3.0.1",
|
|
44
45
|
"@lokalise/tsconfig": "^5.0.0",
|