@lokalise/projects-engine-contracts 8.0.1 → 9.0.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/README.md +11 -4
- 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 +141 -135
- package/dist/apiContracts/projectsContracts.js +11 -7
- package/dist/apiContracts/projectsContracts.js.map +1 -1
- package/dist/apiContracts/translationSettingsContracts.d.ts +44 -44
- package/dist/schemas/projectSchemas.d.ts +78 -49
- package/dist/schemas/projectSchemas.js +46 -8
- package/dist/schemas/projectSchemas.js.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -6,12 +6,19 @@ Shared API contracts and domain schemas for the Projects Engine service.
|
|
|
6
6
|
|
|
7
7
|
### `src/apiContracts/`
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
Typed route contracts built with `@lokalise/api-contracts`, one file per resource:
|
|
10
|
+
`projectsContracts.ts` (`getProjectsContract`, `getProjectContract`, `patchProjectContract`,
|
|
11
|
+
`deleteProjectContract`), plus `languageContracts.ts`, `projectSettingsContracts.ts`,
|
|
12
|
+
`translationSettingsContracts.ts`, `defaultReviewersContracts.ts` and `contributorsContracts.ts`.
|
|
11
13
|
|
|
12
|
-
### `src/
|
|
14
|
+
### `src/schemas/`
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
The Zod schemas those contracts are assembled from — `projectSchemas.ts` (`PROJECT_SCHEMA`,
|
|
17
|
+
`GET_PROJECTS_QUERY_SCHEMA` with `limit`/`after`, `PROJECTS_DEFAULT_LIMIT`, `PROJECTS_MAX_LIMIT`),
|
|
18
|
+
`domainSchemas.ts`, `pathParamsSchemas.ts`, and one file per resource alongside them.
|
|
19
|
+
|
|
20
|
+
The project collection is cursor-paginated: `getProjectsContract` responds with the shared
|
|
21
|
+
`@lokalise/api-common` envelope (`data` array plus `meta: { count, cursor, hasMore }`).
|
|
15
22
|
|
|
16
23
|
## Publishing
|
|
17
24
|
|
|
@@ -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,179 @@
|
|
|
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
|
-
* Public API router definition for
|
|
103
|
+
* Public API router definition for reading the projects collection of a workspace.
|
|
104
|
+
*
|
|
105
|
+
* The path carries no verb, so this and `GET .../projects/{projectId}` read as a
|
|
106
|
+
* collection/member pair, and the response is cursor-paginated with the cursor at `meta.cursor`.
|
|
104
107
|
*/
|
|
105
|
-
export declare const
|
|
106
|
-
data: import("zod
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
projectLanguageUuid: import("zod/v4").ZodGUID;
|
|
123
|
-
}, import("zod/v4/core").$strip>>;
|
|
124
|
-
translationSettings: import("zod/v4").ZodIntersection<import("zod/v4").ZodUnion<readonly [import("zod/v4").ZodObject<{
|
|
125
|
-
workflowType: import("zod/v4").ZodIntersection<import("zod/v4").ZodEnum<{
|
|
126
|
-
readonly AI_ONLY: 'AI_ONLY';
|
|
127
|
-
readonly AI_HUMAN_REVIEW: 'AI_HUMAN_REVIEW';
|
|
128
|
-
}>, import("zod/v4").ZodLiteral<"AI_HUMAN_REVIEW">>;
|
|
129
|
-
reviewThreshold: import("zod/v4").ZodEnum<{
|
|
130
|
-
readonly FULL_REVIEW: 'FULL_REVIEW';
|
|
131
|
-
readonly CRITICAL_MAJOR_MINOR: 'CRITICAL_MAJOR_MINOR';
|
|
132
|
-
readonly CRITICAL_MAJOR: 'CRITICAL_MAJOR';
|
|
133
|
-
readonly CRITICAL: 'CRITICAL';
|
|
134
|
-
}>;
|
|
135
|
-
}, import("zod/v4/core").$strip>, import("zod/v4").ZodObject<{
|
|
136
|
-
workflowType: import("zod/v4").ZodIntersection<import("zod/v4").ZodEnum<{
|
|
137
|
-
readonly AI_ONLY: 'AI_ONLY';
|
|
138
|
-
readonly AI_HUMAN_REVIEW: 'AI_HUMAN_REVIEW';
|
|
139
|
-
}>, import("zod/v4").ZodLiteral<"AI_ONLY">>;
|
|
140
|
-
reviewThreshold: import("zod/v4").ZodNull;
|
|
141
|
-
}, import("zod/v4/core").$strip>]>, import("zod/v4").ZodObject<{
|
|
142
|
-
reviewTurnaroundDays: import("zod/v4").ZodNumber;
|
|
143
|
-
}, import("zod/v4/core").$strip>>;
|
|
144
|
-
contentSourceType: import("zod/v4").ZodNullable<import("zod/v4").ZodString>;
|
|
145
|
-
contentSourceName: import("zod/v4").ZodOptional<import("zod/v4").ZodNullable<import("zod/v4").ZodString>>;
|
|
146
|
-
projectType: import("zod/v4").ZodString;
|
|
108
|
+
export declare const getProjectsContract: import("@lokalise/api-contracts").GetRouteDefinition<import("zod").ZodObject<{
|
|
109
|
+
data: import("zod").ZodArray<import("zod").ZodObject<{
|
|
110
|
+
projectId: import("zod").ZodString;
|
|
111
|
+
uuid: import("zod").ZodGUID;
|
|
112
|
+
name: import("zod").ZodString;
|
|
113
|
+
description: import("zod").ZodString;
|
|
114
|
+
baseLanguage: import("zod").ZodObject<{
|
|
115
|
+
projectLanguageId: import("zod").ZodNumber;
|
|
116
|
+
languageId: import("zod").ZodNumber;
|
|
117
|
+
languageIso: import("zod").ZodString;
|
|
118
|
+
projectLanguageUuid: import("zod").ZodGUID;
|
|
119
|
+
}, import("zod/v4/core").$strip>;
|
|
120
|
+
targetLanguages: import("zod").ZodArray<import("zod").ZodObject<{
|
|
121
|
+
projectLanguageId: import("zod").ZodNumber;
|
|
122
|
+
languageId: import("zod").ZodNumber;
|
|
123
|
+
languageIso: import("zod").ZodString;
|
|
124
|
+
projectLanguageUuid: import("zod").ZodGUID;
|
|
147
125
|
}, import("zod/v4/core").$strip>>;
|
|
126
|
+
translationSettings: import("zod").ZodIntersection<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
127
|
+
workflowType: import("zod").ZodIntersection<import("zod").ZodEnum<{
|
|
128
|
+
readonly AI_ONLY: 'AI_ONLY';
|
|
129
|
+
readonly AI_HUMAN_REVIEW: 'AI_HUMAN_REVIEW';
|
|
130
|
+
}>, import("zod").ZodLiteral<"AI_HUMAN_REVIEW">>;
|
|
131
|
+
reviewThreshold: import("zod").ZodEnum<{
|
|
132
|
+
readonly FULL_REVIEW: 'FULL_REVIEW';
|
|
133
|
+
readonly CRITICAL_MAJOR_MINOR: 'CRITICAL_MAJOR_MINOR';
|
|
134
|
+
readonly CRITICAL_MAJOR: 'CRITICAL_MAJOR';
|
|
135
|
+
readonly CRITICAL: 'CRITICAL';
|
|
136
|
+
}>;
|
|
137
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
138
|
+
workflowType: import("zod").ZodIntersection<import("zod").ZodEnum<{
|
|
139
|
+
readonly AI_ONLY: 'AI_ONLY';
|
|
140
|
+
readonly AI_HUMAN_REVIEW: 'AI_HUMAN_REVIEW';
|
|
141
|
+
}>, import("zod").ZodLiteral<"AI_ONLY">>;
|
|
142
|
+
reviewThreshold: import("zod").ZodNull;
|
|
143
|
+
}, import("zod/v4/core").$strip>]>, import("zod").ZodObject<{
|
|
144
|
+
reviewTurnaroundDays: import("zod").ZodNumber;
|
|
145
|
+
}, import("zod/v4/core").$strip>>;
|
|
146
|
+
contentSourceType: import("zod").ZodNullable<import("zod").ZodString>;
|
|
147
|
+
contentSourceName: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
148
|
+
projectType: import("zod").ZodString;
|
|
149
|
+
}, import("zod/v4/core").$strip>>;
|
|
150
|
+
meta: import("zod").ZodObject<{
|
|
151
|
+
count: import("zod").ZodNumber;
|
|
152
|
+
cursor: import("zod").ZodOptional<import("zod").ZodString>;
|
|
153
|
+
hasMore: import("zod").ZodBoolean;
|
|
148
154
|
}, import("zod/v4/core").$strip>;
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
}, import("zod/v4/core").$strip>,
|
|
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>, import("zod").ZodObject<{
|
|
158
|
+
limit: import("zod").ZodDefault<import("zod").ZodCoercedNumber<unknown>>;
|
|
159
|
+
after: import("zod").ZodOptional<import("zod").ZodString>;
|
|
160
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
161
|
+
authorization: import("zod").ZodString;
|
|
162
|
+
'content-type': import("zod").ZodOptional<import("zod").ZodString>;
|
|
157
163
|
}, import("zod/v4/core").$strip>, undefined, false, false, undefined>;
|
|
158
164
|
/**
|
|
159
165
|
* Public API router definition for deleting a project within a workspace
|
|
160
166
|
*/
|
|
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
|
|
167
|
+
export declare const deleteProjectContract: import("@lokalise/api-contracts").DeleteRouteDefinition<import("zod").ZodObject<{
|
|
168
|
+
data: import("zod").ZodObject<{
|
|
169
|
+
projectId: import("zod").ZodString;
|
|
170
|
+
projectUuid: import("zod").ZodGUID;
|
|
171
|
+
projectDeleted: import("zod").ZodBoolean;
|
|
166
172
|
}, 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
|
|
173
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
174
|
+
workspaceId: import("zod").ZodGUID;
|
|
175
|
+
projectId: import("zod").ZodGUID;
|
|
176
|
+
}, import("zod/v4/core").$strip>, undefined, import("zod").ZodObject<{
|
|
177
|
+
authorization: import("zod").ZodString;
|
|
178
|
+
'content-type': import("zod").ZodOptional<import("zod").ZodString>;
|
|
173
179
|
}, 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,
|
|
3
|
+
import { DELETE_PROJECT_PATH_PARAMS_SCHEMA, DELETE_PROJECT_SUCCESS_RESPONSE_BODY, GET_PROJECT_PATH_PARAMS_SCHEMA, GET_PROJECT_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}`,
|
|
@@ -19,15 +19,19 @@ export const patchProjectContract = buildRestContract({
|
|
|
19
19
|
successResponseBodySchema: PATCH_PROJECT_SUCCESS_RESPONSE_BODY,
|
|
20
20
|
});
|
|
21
21
|
/**
|
|
22
|
-
* Public API router definition for
|
|
22
|
+
* Public API router definition for reading the projects collection of a workspace.
|
|
23
|
+
*
|
|
24
|
+
* The path carries no verb, so this and `GET .../projects/{projectId}` read as a
|
|
25
|
+
* collection/member pair, and the response is cursor-paginated with the cursor at `meta.cursor`.
|
|
23
26
|
*/
|
|
24
|
-
export const
|
|
27
|
+
export const getProjectsContract = buildRestContract({
|
|
25
28
|
method: 'get',
|
|
26
|
-
pathResolver: (params) => `/v1/workspaces/${params.workspaceId}/projects
|
|
27
|
-
description: 'Get projects
|
|
29
|
+
pathResolver: (params) => `/v1/workspaces/${params.workspaceId}/projects`,
|
|
30
|
+
description: 'Get projects',
|
|
28
31
|
requestHeaderSchema: AUTH_HEADERS,
|
|
29
|
-
requestPathParamsSchema:
|
|
30
|
-
|
|
32
|
+
requestPathParamsSchema: GET_PROJECTS_PATH_PARAMS_SCHEMA,
|
|
33
|
+
requestQuerySchema: GET_PROJECTS_QUERY_SCHEMA,
|
|
34
|
+
successResponseBodySchema: GET_PROJECTS_SUCCESS_RESPONSE_BODY,
|
|
31
35
|
});
|
|
32
36
|
/**
|
|
33
37
|
* Public API router definition for deleting a project within a workspace
|
|
@@ -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,
|
|
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,+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,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>;
|
|
@@ -1,61 +1,90 @@
|
|
|
1
1
|
import { z } from 'zod/v4';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const GET_PROJECTS_PATH_PARAMS_SCHEMA: z.ZodObject<{
|
|
3
3
|
workspaceId: z.ZodGUID;
|
|
4
4
|
}, z.core.$strip>;
|
|
5
|
-
export type
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
export type GetProjectsPathParams = z.infer<typeof GET_PROJECTS_PATH_PARAMS_SCHEMA>;
|
|
6
|
+
/**
|
|
7
|
+
* Page size defaults are service-defined (API Governance 5.1). The maximum is far below Expert's
|
|
8
|
+
* own 5000 because every page is enriched with translation settings and content-source
|
|
9
|
+
* integrations, so page size drives fan-out here, not just response size.
|
|
10
|
+
*
|
|
11
|
+
* The ceiling is not a judgement call: it is derived from `MAX_BATCH_PROJECT_IDS`, the hard cap
|
|
12
|
+
* Content Type App Engine enforces on `postRetrieveBatchIntegrationsContract`. Enrichment sends
|
|
13
|
+
* every `marketing_integrations` project on the page to CTAE in a single batch and does not chunk,
|
|
14
|
+
* so a larger page would be rejected upstream. That failure is silent rather than loud - the
|
|
15
|
+
* rejection is caught, the page is served with `contentSourceType: null` on every project, and it
|
|
16
|
+
* is never cached, so the fan-out repeats on every request. Deriving the constant means PE follows
|
|
17
|
+
* CTAE automatically instead of drifting into that state if the upstream cap ever changes.
|
|
18
|
+
*
|
|
19
|
+
* Raising the page size beyond this therefore requires chunking the CTAE calls first, and deciding
|
|
20
|
+
* whether one failed chunk degrades that chunk or the whole page.
|
|
21
|
+
*/
|
|
22
|
+
export declare const PROJECTS_DEFAULT_LIMIT = 100;
|
|
23
|
+
export declare const PROJECTS_MAX_LIMIT = 100;
|
|
24
|
+
/**
|
|
25
|
+
* Request window, shaped after `AFTER_PAGINATION_CONFIG_SCHEMA` from `@lokalise/api-common`:
|
|
26
|
+
* `after` only, since Expert hands back a next cursor and no previous one, so this collection is
|
|
27
|
+
* forward-only. Bounds and the default are applied on top of the shared shape.
|
|
28
|
+
*/
|
|
29
|
+
export declare const GET_PROJECTS_QUERY_SCHEMA: z.ZodObject<{
|
|
30
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
31
|
+
after: z.ZodOptional<z.ZodString>;
|
|
8
32
|
}, z.core.$strip>;
|
|
9
|
-
export type
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
readonly AI_HUMAN_REVIEW: 'AI_HUMAN_REVIEW';
|
|
33
|
-
}>, z.ZodLiteral<"AI_HUMAN_REVIEW">>;
|
|
34
|
-
reviewThreshold: z.ZodEnum<{
|
|
35
|
-
readonly FULL_REVIEW: 'FULL_REVIEW';
|
|
36
|
-
readonly CRITICAL_MAJOR_MINOR: 'CRITICAL_MAJOR_MINOR';
|
|
37
|
-
readonly CRITICAL_MAJOR: 'CRITICAL_MAJOR';
|
|
38
|
-
readonly CRITICAL: 'CRITICAL';
|
|
39
|
-
}>;
|
|
40
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
41
|
-
workflowType: z.ZodIntersection<z.ZodEnum<{
|
|
42
|
-
readonly AI_ONLY: 'AI_ONLY';
|
|
43
|
-
readonly AI_HUMAN_REVIEW: 'AI_HUMAN_REVIEW';
|
|
44
|
-
}>, z.ZodLiteral<"AI_ONLY">>;
|
|
45
|
-
reviewThreshold: z.ZodNull;
|
|
46
|
-
}, z.core.$strip>]>, z.ZodObject<{
|
|
47
|
-
reviewTurnaroundDays: z.ZodNumber;
|
|
48
|
-
}, z.core.$strip>>;
|
|
49
|
-
contentSourceType: z.ZodNullable<z.ZodString>;
|
|
50
|
-
contentSourceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
51
|
-
projectType: z.ZodString;
|
|
33
|
+
export type GetProjectsQuery = z.infer<typeof GET_PROJECTS_QUERY_SCHEMA>;
|
|
34
|
+
/**
|
|
35
|
+
* Uses the canonical `paginatedResponseSchema` from `@lokalise/api-common` so the envelope is
|
|
36
|
+
* identical to the other Lokalise services: `data` is a bare array and everything that is not
|
|
37
|
+
* response data lives under `meta`, with `meta.cursor` absent once the collection is exhausted.
|
|
38
|
+
*/
|
|
39
|
+
export declare const GET_PROJECTS_SUCCESS_RESPONSE_BODY: z.ZodObject<{
|
|
40
|
+
data: z.ZodArray<z.ZodObject<{
|
|
41
|
+
projectId: z.ZodString;
|
|
42
|
+
uuid: z.ZodGUID;
|
|
43
|
+
name: z.ZodString;
|
|
44
|
+
description: z.ZodString;
|
|
45
|
+
baseLanguage: z.ZodObject<{
|
|
46
|
+
projectLanguageId: z.ZodNumber;
|
|
47
|
+
languageId: z.ZodNumber;
|
|
48
|
+
languageIso: z.ZodString;
|
|
49
|
+
projectLanguageUuid: z.ZodGUID;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
targetLanguages: z.ZodArray<z.ZodObject<{
|
|
52
|
+
projectLanguageId: z.ZodNumber;
|
|
53
|
+
languageId: z.ZodNumber;
|
|
54
|
+
languageIso: z.ZodString;
|
|
55
|
+
projectLanguageUuid: z.ZodGUID;
|
|
52
56
|
}, z.core.$strip>>;
|
|
53
|
-
|
|
57
|
+
translationSettings: z.ZodIntersection<z.ZodUnion<readonly [z.ZodObject<{
|
|
58
|
+
workflowType: z.ZodIntersection<z.ZodEnum<{
|
|
59
|
+
readonly AI_ONLY: 'AI_ONLY';
|
|
60
|
+
readonly AI_HUMAN_REVIEW: 'AI_HUMAN_REVIEW';
|
|
61
|
+
}>, z.ZodLiteral<"AI_HUMAN_REVIEW">>;
|
|
62
|
+
reviewThreshold: z.ZodEnum<{
|
|
63
|
+
readonly FULL_REVIEW: 'FULL_REVIEW';
|
|
64
|
+
readonly CRITICAL_MAJOR_MINOR: 'CRITICAL_MAJOR_MINOR';
|
|
65
|
+
readonly CRITICAL_MAJOR: 'CRITICAL_MAJOR';
|
|
66
|
+
readonly CRITICAL: 'CRITICAL';
|
|
67
|
+
}>;
|
|
68
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
69
|
+
workflowType: z.ZodIntersection<z.ZodEnum<{
|
|
70
|
+
readonly AI_ONLY: 'AI_ONLY';
|
|
71
|
+
readonly AI_HUMAN_REVIEW: 'AI_HUMAN_REVIEW';
|
|
72
|
+
}>, z.ZodLiteral<"AI_ONLY">>;
|
|
73
|
+
reviewThreshold: z.ZodNull;
|
|
74
|
+
}, z.core.$strip>]>, z.ZodObject<{
|
|
75
|
+
reviewTurnaroundDays: z.ZodNumber;
|
|
76
|
+
}, z.core.$strip>>;
|
|
77
|
+
contentSourceType: z.ZodNullable<z.ZodString>;
|
|
78
|
+
contentSourceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
79
|
+
projectType: z.ZodString;
|
|
80
|
+
}, z.core.$strip>>;
|
|
54
81
|
meta: z.ZodObject<{
|
|
55
82
|
count: z.ZodNumber;
|
|
83
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
84
|
+
hasMore: z.ZodBoolean;
|
|
56
85
|
}, z.core.$strip>;
|
|
57
86
|
}, z.core.$strip>;
|
|
58
|
-
export type
|
|
87
|
+
export type GetProjectsSuccessResponse = z.infer<typeof GET_PROJECTS_SUCCESS_RESPONSE_BODY>;
|
|
59
88
|
export declare const GET_PROJECT_PATH_PARAMS_SCHEMA: z.ZodObject<{
|
|
60
89
|
workspaceId: z.ZodGUID;
|
|
61
90
|
projectId: z.ZodGUID;
|
|
@@ -1,15 +1,53 @@
|
|
|
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
|
|
5
|
-
export const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
// GET PROJECTS (cursor-paginated collection read)
|
|
7
|
+
export const GET_PROJECTS_PATH_PARAMS_SCHEMA = WORKSPACE_ONLY_PATH_PARAMS_SCHEMA;
|
|
8
|
+
/**
|
|
9
|
+
* Page size defaults are service-defined (API Governance 5.1). The maximum is far below Expert's
|
|
10
|
+
* own 5000 because every page is enriched with translation settings and content-source
|
|
11
|
+
* integrations, so page size drives fan-out here, not just response size.
|
|
12
|
+
*
|
|
13
|
+
* The ceiling is not a judgement call: it is derived from `MAX_BATCH_PROJECT_IDS`, the hard cap
|
|
14
|
+
* Content Type App Engine enforces on `postRetrieveBatchIntegrationsContract`. Enrichment sends
|
|
15
|
+
* every `marketing_integrations` project on the page to CTAE in a single batch and does not chunk,
|
|
16
|
+
* so a larger page would be rejected upstream. That failure is silent rather than loud - the
|
|
17
|
+
* rejection is caught, the page is served with `contentSourceType: null` on every project, and it
|
|
18
|
+
* is never cached, so the fan-out repeats on every request. Deriving the constant means PE follows
|
|
19
|
+
* CTAE automatically instead of drifting into that state if the upstream cap ever changes.
|
|
20
|
+
*
|
|
21
|
+
* Raising the page size beyond this therefore requires chunking the CTAE calls first, and deciding
|
|
22
|
+
* whether one failed chunk degrades that chunk or the whole page.
|
|
23
|
+
*/
|
|
24
|
+
export const PROJECTS_DEFAULT_LIMIT = 100;
|
|
25
|
+
export const PROJECTS_MAX_LIMIT = MAX_BATCH_PROJECT_IDS;
|
|
26
|
+
/**
|
|
27
|
+
* Request window, shaped after `AFTER_PAGINATION_CONFIG_SCHEMA` from `@lokalise/api-common`:
|
|
28
|
+
* `after` only, since Expert hands back a next cursor and no previous one, so this collection is
|
|
29
|
+
* forward-only. Bounds and the default are applied on top of the shared shape.
|
|
30
|
+
*/
|
|
31
|
+
export const GET_PROJECTS_QUERY_SCHEMA = z.object({
|
|
32
|
+
limit: z.coerce
|
|
33
|
+
.number()
|
|
34
|
+
.int()
|
|
35
|
+
.min(1)
|
|
36
|
+
.max(PROJECTS_MAX_LIMIT)
|
|
37
|
+
.default(PROJECTS_DEFAULT_LIMIT)
|
|
38
|
+
.describe('Number of projects to return per page'),
|
|
39
|
+
after: z
|
|
40
|
+
.string()
|
|
41
|
+
.min(1)
|
|
42
|
+
.optional()
|
|
43
|
+
.describe('Opaque cursor from the previous response `meta.cursor`. Omit to read the first page'),
|
|
12
44
|
});
|
|
45
|
+
/**
|
|
46
|
+
* Uses the canonical `paginatedResponseSchema` from `@lokalise/api-common` so the envelope is
|
|
47
|
+
* identical to the other Lokalise services: `data` is a bare array and everything that is not
|
|
48
|
+
* response data lives under `meta`, with `meta.cursor` absent once the collection is exhausted.
|
|
49
|
+
*/
|
|
50
|
+
export const GET_PROJECTS_SUCCESS_RESPONSE_BODY = paginatedResponseSchema(PROJECT_SCHEMA);
|
|
13
51
|
// GET PROJECT
|
|
14
52
|
export const GET_PROJECT_PATH_PARAMS_SCHEMA = PROJECT_PATH_PARAMS_SCHEMA;
|
|
15
53
|
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,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": "
|
|
3
|
+
"version": "9.0.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"
|