@lokalise/projects-engine-contracts 13.1.1 → 15.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/dist/apiContracts/languageContracts.d.ts +32 -0
- package/dist/apiContracts/languageContracts.js +20 -3
- package/dist/apiContracts/languageContracts.js.map +1 -1
- package/dist/apiContracts/projectsContracts.d.ts +24 -8
- package/dist/schemas/domainSchemas.d.ts +34 -4
- package/dist/schemas/domainSchemas.js +50 -6
- package/dist/schemas/domainSchemas.js.map +1 -1
- package/dist/schemas/languageSchemas.d.ts +21 -2
- package/dist/schemas/languageSchemas.js +15 -5
- package/dist/schemas/languageSchemas.js.map +1 -1
- package/dist/schemas/pathParamsSchemas.d.ts +4 -0
- package/dist/schemas/pathParamsSchemas.js +3 -0
- package/dist/schemas/pathParamsSchemas.js.map +1 -1
- package/dist/schemas/projectSchemas.d.ts +24 -8
- package/package.json +1 -1
|
@@ -1,4 +1,36 @@
|
|
|
1
1
|
export declare const getProjectLanguagesContract: Omit<{
|
|
2
|
+
readonly visibility: "public";
|
|
3
|
+
readonly method: "get";
|
|
4
|
+
readonly pathResolver: (params: {
|
|
5
|
+
projectId: string;
|
|
6
|
+
}) => string;
|
|
7
|
+
readonly summary: "List project languages";
|
|
8
|
+
readonly description: "Lists the languages of a project the caller is a contributor of, the base language and every target language. `languageId` is the language UUID other endpoints take to select a language, for example the export call and the translation status; `locale` is its BCP 47 code.";
|
|
9
|
+
readonly tags: readonly ["Projects"];
|
|
10
|
+
readonly requestHeaderSchema: import("zod").ZodObject<{
|
|
11
|
+
authorization: import("zod").ZodString;
|
|
12
|
+
'content-type': import("zod").ZodOptional<import("zod").ZodString>;
|
|
13
|
+
}, import("zod/v4/core").$strip>;
|
|
14
|
+
readonly requestPathParamsSchema: import("zod").ZodObject<{
|
|
15
|
+
projectId: import("zod").ZodGUID;
|
|
16
|
+
}, import("zod/v4/core").$strip>;
|
|
17
|
+
readonly responsesByStatusCode: {
|
|
18
|
+
200: import("zod").ZodObject<{
|
|
19
|
+
data: import("zod").ZodArray<import("zod").ZodObject<{
|
|
20
|
+
languageId: import("zod").ZodGUID;
|
|
21
|
+
locale: import("zod").ZodString;
|
|
22
|
+
languageName: import("zod").ZodString;
|
|
23
|
+
isRtl: import("zod").ZodBoolean;
|
|
24
|
+
}, import("zod/v4/core").$strip>>;
|
|
25
|
+
}, import("zod/v4/core").$strip>;
|
|
26
|
+
};
|
|
27
|
+
}, "visibility"> & {
|
|
28
|
+
visibility: import("@lokalise/api-contracts").RouteVisibility;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated Use `getProjectLanguagesContract` instead
|
|
32
|
+
*/
|
|
33
|
+
export declare const getProjectLanguagesContractLegacy: Omit<{
|
|
2
34
|
readonly visibility: "internal";
|
|
3
35
|
readonly method: "get";
|
|
4
36
|
readonly pathResolver: (params: {
|
|
@@ -1,16 +1,33 @@
|
|
|
1
1
|
import { defineApiContract } from '@lokalise/api-contracts';
|
|
2
2
|
import { AUTH_HEADERS } from '../schemas/domainSchemas.js';
|
|
3
|
-
import { ADD_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA, ADD_PROJECT_LANGUAGES_REQUEST_BODY_SCHEMA, ADD_PROJECT_LANGUAGES_SUCCESS_RESPONSE_BODY, BULK_UPDATE_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA, BULK_UPDATE_PROJECT_LANGUAGES_REQUEST_BODY_SCHEMA, BULK_UPDATE_PROJECT_LANGUAGES_SUCCESS_RESPONSE_BODY, GET_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA, GET_PROJECT_LANGUAGES_SUCCESS_RESPONSE_BODY, } from '../schemas/languageSchemas.js';
|
|
3
|
+
import { ADD_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA, ADD_PROJECT_LANGUAGES_REQUEST_BODY_SCHEMA, ADD_PROJECT_LANGUAGES_SUCCESS_RESPONSE_BODY, BULK_UPDATE_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA, BULK_UPDATE_PROJECT_LANGUAGES_REQUEST_BODY_SCHEMA, BULK_UPDATE_PROJECT_LANGUAGES_SUCCESS_RESPONSE_BODY, GET_PROJECT_LANGUAGES_LEGACY_SUCCESS_RESPONSE_BODY, GET_PROJECT_LANGUAGES_PATH_PARAMS_LEGACY_SCHEMA, GET_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA, GET_PROJECT_LANGUAGES_SUCCESS_RESPONSE_BODY, } from '../schemas/languageSchemas.js';
|
|
4
|
+
import { OpenApiTags } from './openApiTags.js';
|
|
4
5
|
export const getProjectLanguagesContract = defineApiContract({
|
|
6
|
+
visibility: 'public',
|
|
7
|
+
method: 'get',
|
|
8
|
+
pathResolver: (params) => `/v1/projects/${params.projectId}/languages`,
|
|
9
|
+
summary: 'List project languages',
|
|
10
|
+
description: 'Lists the languages of a project the caller is a contributor of, the base language and every target language. `languageId` is the language UUID other endpoints take to select a language, for example the export call and the translation status; `locale` is its BCP 47 code.',
|
|
11
|
+
tags: [OpenApiTags.Projects.name],
|
|
12
|
+
requestHeaderSchema: AUTH_HEADERS,
|
|
13
|
+
requestPathParamsSchema: GET_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA,
|
|
14
|
+
responsesByStatusCode: {
|
|
15
|
+
200: GET_PROJECT_LANGUAGES_SUCCESS_RESPONSE_BODY,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Use `getProjectLanguagesContract` instead
|
|
20
|
+
*/
|
|
21
|
+
export const getProjectLanguagesContractLegacy = defineApiContract({
|
|
5
22
|
visibility: 'internal',
|
|
6
23
|
method: 'get',
|
|
7
24
|
pathResolver: (params) => `/v1/workspaces/${params.workspaceId}/projects/${params.projectId}/languages`,
|
|
8
25
|
summary: 'Get project languages',
|
|
9
26
|
description: 'Get all languages for a project',
|
|
10
27
|
requestHeaderSchema: AUTH_HEADERS,
|
|
11
|
-
requestPathParamsSchema:
|
|
28
|
+
requestPathParamsSchema: GET_PROJECT_LANGUAGES_PATH_PARAMS_LEGACY_SCHEMA,
|
|
12
29
|
responsesByStatusCode: {
|
|
13
|
-
200:
|
|
30
|
+
200: GET_PROJECT_LANGUAGES_LEGACY_SUCCESS_RESPONSE_BODY,
|
|
14
31
|
},
|
|
15
32
|
});
|
|
16
33
|
export const addProjectLanguagesContract = defineApiContract({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"languageContracts.js","sourceRoot":"","sources":["../../src/apiContracts/languageContracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC1D,OAAO,EACL,wCAAwC,EACxC,yCAAyC,EACzC,2CAA2C,EAC3C,gDAAgD,EAChD,iDAAiD,EACjD,mDAAmD,EACnD,wCAAwC,EACxC,2CAA2C,GAC5C,MAAM,+BAA+B,CAAA;
|
|
1
|
+
{"version":3,"file":"languageContracts.js","sourceRoot":"","sources":["../../src/apiContracts/languageContracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC1D,OAAO,EACL,wCAAwC,EACxC,yCAAyC,EACzC,2CAA2C,EAC3C,gDAAgD,EAChD,iDAAiD,EACjD,mDAAmD,EACnD,kDAAkD,EAClD,+CAA+C,EAC/C,wCAAwC,EACxC,2CAA2C,GAC5C,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,MAAM,CAAC,MAAM,2BAA2B,GAAG,iBAAiB,CAAC;IAC3D,UAAU,EAAE,QAAQ;IACpB,MAAM,EAAE,KAAK;IACb,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,gBAAgB,MAAM,CAAC,SAAS,YA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a,MAAM,CAAC,SAAS,YAAY;IAC/E,OAAO,EAAE,2BAA2B;IACpC,WAAW,EAAE,gCAAgC;IAC7C,mBAAmB,EAAE,YAAY;IACjC,uBAAuB,EAAE,gDAAgD;IACzE,iBAAiB,EAAE,iDAAiD;IACpE,qBAAqB,EAAE;QACrB,GAAG,EAAE,mDAAmD;KACzD;CACF,CAAC,CAAA"}
|
|
@@ -23,14 +23,18 @@ export declare const getProjectContract: Omit<{
|
|
|
23
23
|
name: import("zod").ZodString;
|
|
24
24
|
description: import("zod").ZodString;
|
|
25
25
|
baseLanguage: import("zod").ZodObject<{
|
|
26
|
+
languageId: import("zod").ZodUnion<readonly [import("zod").ZodGUID, import("zod").ZodNumber]>;
|
|
27
|
+
locale: import("zod").ZodString;
|
|
28
|
+
systemLanguageId: import("zod").ZodNumber;
|
|
26
29
|
projectLanguageId: import("zod").ZodNumber;
|
|
27
|
-
languageId: import("zod").ZodNumber;
|
|
28
30
|
languageIso: import("zod").ZodString;
|
|
29
31
|
projectLanguageUuid: import("zod").ZodGUID;
|
|
30
32
|
}, import("zod/v4/core").$strip>;
|
|
31
33
|
targetLanguages: import("zod").ZodArray<import("zod").ZodObject<{
|
|
34
|
+
languageId: import("zod").ZodUnion<readonly [import("zod").ZodGUID, import("zod").ZodNumber]>;
|
|
35
|
+
locale: import("zod").ZodString;
|
|
36
|
+
systemLanguageId: import("zod").ZodNumber;
|
|
32
37
|
projectLanguageId: import("zod").ZodNumber;
|
|
33
|
-
languageId: import("zod").ZodNumber;
|
|
34
38
|
languageIso: import("zod").ZodString;
|
|
35
39
|
projectLanguageUuid: import("zod").ZodGUID;
|
|
36
40
|
}, import("zod/v4/core").$strip>>;
|
|
@@ -91,14 +95,18 @@ export declare const patchProjectContract: Omit<{
|
|
|
91
95
|
name: import("zod").ZodString;
|
|
92
96
|
description: import("zod").ZodString;
|
|
93
97
|
baseLanguage: import("zod").ZodObject<{
|
|
98
|
+
languageId: import("zod").ZodUnion<readonly [import("zod").ZodGUID, import("zod").ZodNumber]>;
|
|
99
|
+
locale: import("zod").ZodString;
|
|
100
|
+
systemLanguageId: import("zod").ZodNumber;
|
|
94
101
|
projectLanguageId: import("zod").ZodNumber;
|
|
95
|
-
languageId: import("zod").ZodNumber;
|
|
96
102
|
languageIso: import("zod").ZodString;
|
|
97
103
|
projectLanguageUuid: import("zod").ZodGUID;
|
|
98
104
|
}, import("zod/v4/core").$strip>;
|
|
99
105
|
targetLanguages: import("zod").ZodArray<import("zod").ZodObject<{
|
|
106
|
+
languageId: import("zod").ZodUnion<readonly [import("zod").ZodGUID, import("zod").ZodNumber]>;
|
|
107
|
+
locale: import("zod").ZodString;
|
|
108
|
+
systemLanguageId: import("zod").ZodNumber;
|
|
100
109
|
projectLanguageId: import("zod").ZodNumber;
|
|
101
|
-
languageId: import("zod").ZodNumber;
|
|
102
110
|
languageIso: import("zod").ZodString;
|
|
103
111
|
projectLanguageUuid: import("zod").ZodGUID;
|
|
104
112
|
}, import("zod/v4/core").$strip>>;
|
|
@@ -164,14 +172,18 @@ export declare const getProjectsContract: Omit<{
|
|
|
164
172
|
name: import("zod").ZodString;
|
|
165
173
|
description: import("zod").ZodString;
|
|
166
174
|
baseLanguage: import("zod").ZodObject<{
|
|
175
|
+
languageId: import("zod").ZodUnion<readonly [import("zod").ZodGUID, import("zod").ZodNumber]>;
|
|
176
|
+
locale: import("zod").ZodString;
|
|
177
|
+
systemLanguageId: import("zod").ZodNumber;
|
|
167
178
|
projectLanguageId: import("zod").ZodNumber;
|
|
168
|
-
languageId: import("zod").ZodNumber;
|
|
169
179
|
languageIso: import("zod").ZodString;
|
|
170
180
|
projectLanguageUuid: import("zod").ZodGUID;
|
|
171
181
|
}, import("zod/v4/core").$strip>;
|
|
172
182
|
targetLanguages: import("zod").ZodArray<import("zod").ZodObject<{
|
|
183
|
+
languageId: import("zod").ZodUnion<readonly [import("zod").ZodGUID, import("zod").ZodNumber]>;
|
|
184
|
+
locale: import("zod").ZodString;
|
|
185
|
+
systemLanguageId: import("zod").ZodNumber;
|
|
173
186
|
projectLanguageId: import("zod").ZodNumber;
|
|
174
|
-
languageId: import("zod").ZodNumber;
|
|
175
187
|
languageIso: import("zod").ZodString;
|
|
176
188
|
projectLanguageUuid: import("zod").ZodGUID;
|
|
177
189
|
}, import("zod/v4/core").$strip>>;
|
|
@@ -239,14 +251,18 @@ export declare const postRetrieveBatchProjectsContract: Omit<{
|
|
|
239
251
|
name: import("zod").ZodString;
|
|
240
252
|
description: import("zod").ZodString;
|
|
241
253
|
baseLanguage: import("zod").ZodObject<{
|
|
254
|
+
languageId: import("zod").ZodUnion<readonly [import("zod").ZodGUID, import("zod").ZodNumber]>;
|
|
255
|
+
locale: import("zod").ZodString;
|
|
256
|
+
systemLanguageId: import("zod").ZodNumber;
|
|
242
257
|
projectLanguageId: import("zod").ZodNumber;
|
|
243
|
-
languageId: import("zod").ZodNumber;
|
|
244
258
|
languageIso: import("zod").ZodString;
|
|
245
259
|
projectLanguageUuid: import("zod").ZodGUID;
|
|
246
260
|
}, import("zod/v4/core").$strip>;
|
|
247
261
|
targetLanguages: import("zod").ZodArray<import("zod").ZodObject<{
|
|
262
|
+
languageId: import("zod").ZodUnion<readonly [import("zod").ZodGUID, import("zod").ZodNumber]>;
|
|
263
|
+
locale: import("zod").ZodString;
|
|
264
|
+
systemLanguageId: import("zod").ZodNumber;
|
|
248
265
|
projectLanguageId: import("zod").ZodNumber;
|
|
249
|
-
languageId: import("zod").ZodNumber;
|
|
250
266
|
languageIso: import("zod").ZodString;
|
|
251
267
|
projectLanguageUuid: import("zod").ZodGUID;
|
|
252
268
|
}, import("zod/v4/core").$strip>>;
|
|
@@ -5,6 +5,17 @@ export declare const AUTH_HEADERS: z.ZodObject<{
|
|
|
5
5
|
}, z.core.$strip>;
|
|
6
6
|
export type AuthHeaders = z.infer<typeof AUTH_HEADERS>;
|
|
7
7
|
export declare const LANGUAGE_SCHEMA: z.ZodObject<{
|
|
8
|
+
languageId: z.ZodGUID;
|
|
9
|
+
locale: z.ZodString;
|
|
10
|
+
languageName: z.ZodString;
|
|
11
|
+
isRtl: z.ZodBoolean;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
export type Language = z.infer<typeof LANGUAGE_SCHEMA>;
|
|
14
|
+
/**
|
|
15
|
+
* The web app's language shape, served by the `/workspaces` routes. The `/teams` routes serve
|
|
16
|
+
* `LANGUAGE_SCHEMA`, which new callers should use.
|
|
17
|
+
*/
|
|
18
|
+
export declare const LANGUAGE_LEGACY_SCHEMA: z.ZodObject<{
|
|
8
19
|
projectLanguageId: z.ZodNumber;
|
|
9
20
|
languageId: z.ZodNumber;
|
|
10
21
|
languageIso: z.ZodString;
|
|
@@ -12,26 +23,45 @@ export declare const LANGUAGE_SCHEMA: z.ZodObject<{
|
|
|
12
23
|
isRtl: z.ZodBoolean;
|
|
13
24
|
projectLanguageUuid: z.ZodGUID;
|
|
14
25
|
}, z.core.$strip>;
|
|
15
|
-
export type
|
|
26
|
+
export type LanguageLegacy = z.infer<typeof LANGUAGE_LEGACY_SCHEMA>;
|
|
27
|
+
/**
|
|
28
|
+
* A language as it appears inside a project. Public callers get the two fields the other public
|
|
29
|
+
* endpoints key on, `languageId` and `locale`, the same `languageId` the languages endpoint
|
|
30
|
+
* returns. The internal-marked fields are what the web app and barker still read: the public
|
|
31
|
+
* OpenAPI document drops them, and so do public responses once `apiVisibilityPlugin` runs.
|
|
32
|
+
* `systemLanguageId` is Expert's numeric catalog id, the value `languageId` carried before.
|
|
33
|
+
*
|
|
34
|
+
* Transitional (MET-2301): consumers validate responses against the contracts version they
|
|
35
|
+
* have installed, so `languageId` is widened to number-or-UUID here while the service still
|
|
36
|
+
* sends the number. Once every consumer is on this version, the service switches to the UUID
|
|
37
|
+
* and the next major narrows `languageId` to `LANGUAGE_SCHEMA`'s.
|
|
38
|
+
*/
|
|
16
39
|
export declare const PROJECT_LANGUAGE_SCHEMA: z.ZodObject<{
|
|
40
|
+
languageId: z.ZodUnion<readonly [z.ZodGUID, z.ZodNumber]>;
|
|
41
|
+
locale: z.ZodString;
|
|
42
|
+
systemLanguageId: z.ZodNumber;
|
|
17
43
|
projectLanguageId: z.ZodNumber;
|
|
18
|
-
languageId: z.ZodNumber;
|
|
19
44
|
languageIso: z.ZodString;
|
|
20
45
|
projectLanguageUuid: z.ZodGUID;
|
|
21
46
|
}, z.core.$strip>;
|
|
47
|
+
export type ProjectLanguage = z.infer<typeof PROJECT_LANGUAGE_SCHEMA>;
|
|
22
48
|
export declare const PROJECT_SCHEMA: z.ZodObject<{
|
|
23
49
|
projectId: z.ZodGUID;
|
|
24
50
|
name: z.ZodString;
|
|
25
51
|
description: z.ZodString;
|
|
26
52
|
baseLanguage: z.ZodObject<{
|
|
53
|
+
languageId: z.ZodUnion<readonly [z.ZodGUID, z.ZodNumber]>;
|
|
54
|
+
locale: z.ZodString;
|
|
55
|
+
systemLanguageId: z.ZodNumber;
|
|
27
56
|
projectLanguageId: z.ZodNumber;
|
|
28
|
-
languageId: z.ZodNumber;
|
|
29
57
|
languageIso: z.ZodString;
|
|
30
58
|
projectLanguageUuid: z.ZodGUID;
|
|
31
59
|
}, z.core.$strip>;
|
|
32
60
|
targetLanguages: z.ZodArray<z.ZodObject<{
|
|
61
|
+
languageId: z.ZodUnion<readonly [z.ZodGUID, z.ZodNumber]>;
|
|
62
|
+
locale: z.ZodString;
|
|
63
|
+
systemLanguageId: z.ZodNumber;
|
|
33
64
|
projectLanguageId: z.ZodNumber;
|
|
34
|
-
languageId: z.ZodNumber;
|
|
35
65
|
languageIso: z.ZodString;
|
|
36
66
|
projectLanguageUuid: z.ZodGUID;
|
|
37
67
|
}, z.core.$strip>>;
|
|
@@ -8,6 +8,22 @@ export const AUTH_HEADERS = z.object({
|
|
|
8
8
|
'content-type': z.string().optional().describe('Content type'),
|
|
9
9
|
});
|
|
10
10
|
export const LANGUAGE_SCHEMA = z.object({
|
|
11
|
+
languageId: z
|
|
12
|
+
.guid()
|
|
13
|
+
.describe('The language UUID, the id other endpoints take as `languageId`, for example the export call'),
|
|
14
|
+
locale: z.string().describe('The BCP 47 locale of the language, for example `en` or `pt-BR`'),
|
|
15
|
+
languageName: z.string().describe('The language name'),
|
|
16
|
+
isRtl: z.boolean().describe('Whether the language is written right to left'),
|
|
17
|
+
});
|
|
18
|
+
z.globalRegistry.add(LANGUAGE_SCHEMA, {
|
|
19
|
+
id: 'Language',
|
|
20
|
+
description: 'A language of a project.',
|
|
21
|
+
});
|
|
22
|
+
/**
|
|
23
|
+
* The web app's language shape, served by the `/workspaces` routes. The `/teams` routes serve
|
|
24
|
+
* `LANGUAGE_SCHEMA`, which new callers should use.
|
|
25
|
+
*/
|
|
26
|
+
export const LANGUAGE_LEGACY_SCHEMA = z.object({
|
|
11
27
|
projectLanguageId: z.number().describe('Numeric id of the language within the project'),
|
|
12
28
|
languageId: z.number().describe('Numeric id of the language in the Lokalise language catalog'),
|
|
13
29
|
languageIso: z.string().describe('Language code, for example `en` or `pt_BR`'),
|
|
@@ -15,15 +31,43 @@ export const LANGUAGE_SCHEMA = z.object({
|
|
|
15
31
|
isRtl: z.boolean().describe('Whether the language is written right to left'),
|
|
16
32
|
projectLanguageUuid: z.guid().describe('UUID of the language within the project'),
|
|
17
33
|
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
34
|
+
/**
|
|
35
|
+
* A language as it appears inside a project. Public callers get the two fields the other public
|
|
36
|
+
* endpoints key on, `languageId` and `locale`, the same `languageId` the languages endpoint
|
|
37
|
+
* returns. The internal-marked fields are what the web app and barker still read: the public
|
|
38
|
+
* OpenAPI document drops them, and so do public responses once `apiVisibilityPlugin` runs.
|
|
39
|
+
* `systemLanguageId` is Expert's numeric catalog id, the value `languageId` carried before.
|
|
40
|
+
*
|
|
41
|
+
* Transitional (MET-2301): consumers validate responses against the contracts version they
|
|
42
|
+
* have installed, so `languageId` is widened to number-or-UUID here while the service still
|
|
43
|
+
* sends the number. Once every consumer is on this version, the service switches to the UUID
|
|
44
|
+
* and the next major narrows `languageId` to `LANGUAGE_SCHEMA`'s.
|
|
45
|
+
*/
|
|
46
|
+
export const PROJECT_LANGUAGE_SCHEMA = z.object({
|
|
47
|
+
languageId: z
|
|
48
|
+
.union([z.guid(), z.number()])
|
|
49
|
+
.describe('The language UUID, the id other endpoints take as `languageId`, for example the export call. Transitional: numeric until the next contracts major, read `systemLanguageId` for the numeric id'),
|
|
50
|
+
locale: LANGUAGE_SCHEMA.shape.locale,
|
|
51
|
+
systemLanguageId: z.number().meta({
|
|
52
|
+
description: 'Numeric id of the language in the Lokalise language catalog',
|
|
53
|
+
visibility: 'internal',
|
|
54
|
+
}),
|
|
55
|
+
projectLanguageId: z.number().meta({
|
|
56
|
+
description: 'Numeric id of the language within the project',
|
|
57
|
+
visibility: 'internal',
|
|
58
|
+
}),
|
|
59
|
+
languageIso: z.string().meta({
|
|
60
|
+
description: 'Language code, for example `en` or `pt_BR`',
|
|
61
|
+
visibility: 'internal',
|
|
62
|
+
}),
|
|
63
|
+
projectLanguageUuid: z.guid().meta({
|
|
64
|
+
description: 'UUID of the language within the project, the same value as `languageId`',
|
|
65
|
+
visibility: 'internal',
|
|
66
|
+
}),
|
|
23
67
|
});
|
|
24
68
|
z.globalRegistry.add(PROJECT_LANGUAGE_SCHEMA, {
|
|
25
69
|
id: 'ProjectLanguage',
|
|
26
|
-
description: 'A language of a project, as its base language or as a target language.',
|
|
70
|
+
description: 'A language of a project, as its base language or as a target language. Its name and direction are on the project languages endpoint, under the same `languageId`.',
|
|
27
71
|
});
|
|
28
72
|
export const PROJECT_SCHEMA = z.object({
|
|
29
73
|
projectId: z.guid().describe('The project UUID, the id other endpoints take as `projectId`'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domainSchemas.js","sourceRoot":"","sources":["../../src/schemas/domainSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC1B,OAAO,EAAE,2BAA2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Y,EAAE,uBAAuB,CAAC,QAAQ,CAAC,yCAAyC,CAAC;IACzF,eAAe,EAAE,CAAC;SACf,KAAK,CAAC,uBAAuB,CAAC;SAC9B,QAAQ,CAAC,0CAA0C,CAAC;IACvD,mBAAmB,EAAE,2BAA2B,CAAC,QAAQ,CACvD,wDAAwD,CACzD;IACD,iBAAiB,EAAE,CAAC;SACjB,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,uNAAuN,CACxN;IACH,iBAAiB,EAAE,CAAC;SACjB,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,EAAE;SACV,QAAQ,CACP,mGAAmG,CACpG;IACH,WAAW,EAAE,CAAC;SACX,MAAM,EAAE;SACR,QAAQ,CACP,kHAAkH,CACnH;CACJ,CAAC,CAAA;AACF,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,cAAc,EAAE;IACnC,EAAE,EAAE,SAAS;IACb,WAAW,EACT,4FAA4F;CAC/F,CAAC,CAAA"}
|
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
import { z } from 'zod/v4';
|
|
2
2
|
export declare const GET_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA: z.ZodObject<{
|
|
3
|
-
workspaceId: z.ZodGUID;
|
|
4
3
|
projectId: z.ZodGUID;
|
|
5
4
|
}, z.core.$strip>;
|
|
6
5
|
export type GetProjectLanguagesPathParams = z.infer<typeof GET_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA>;
|
|
7
6
|
export declare const GET_PROJECT_LANGUAGES_SUCCESS_RESPONSE_BODY: z.ZodObject<{
|
|
7
|
+
data: z.ZodArray<z.ZodObject<{
|
|
8
|
+
languageId: z.ZodGUID;
|
|
9
|
+
locale: z.ZodString;
|
|
10
|
+
languageName: z.ZodString;
|
|
11
|
+
isRtl: z.ZodBoolean;
|
|
12
|
+
}, z.core.$strip>>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export type GetProjectLanguagesSuccessResponse = z.infer<typeof GET_PROJECT_LANGUAGES_SUCCESS_RESPONSE_BODY>;
|
|
15
|
+
export declare const GET_PROJECT_LANGUAGES_PATH_PARAMS_LEGACY_SCHEMA: z.ZodObject<{
|
|
16
|
+
workspaceId: z.ZodGUID;
|
|
17
|
+
projectId: z.ZodGUID;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export type GetProjectLanguagesPathParamsLegacy = z.infer<typeof GET_PROJECT_LANGUAGES_PATH_PARAMS_LEGACY_SCHEMA>;
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated Use `GET_PROJECT_LANGUAGES_SUCCESS_RESPONSE_BODY` instead
|
|
22
|
+
*/
|
|
23
|
+
export declare const GET_PROJECT_LANGUAGES_LEGACY_SUCCESS_RESPONSE_BODY: z.ZodObject<{
|
|
8
24
|
data: z.ZodObject<{
|
|
9
25
|
languages: z.ZodArray<z.ZodObject<{
|
|
10
26
|
projectLanguageId: z.ZodNumber;
|
|
@@ -19,7 +35,10 @@ export declare const GET_PROJECT_LANGUAGES_SUCCESS_RESPONSE_BODY: z.ZodObject<{
|
|
|
19
35
|
count: z.ZodNumber;
|
|
20
36
|
}, z.core.$strip>;
|
|
21
37
|
}, z.core.$strip>;
|
|
22
|
-
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated Use `GetProjectLanguagesSuccessResponse` instead
|
|
40
|
+
*/
|
|
41
|
+
export type GetProjectLanguagesLegacySuccessResponse = z.infer<typeof GET_PROJECT_LANGUAGES_LEGACY_SUCCESS_RESPONSE_BODY>;
|
|
23
42
|
export declare const ADD_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA: z.ZodObject<{
|
|
24
43
|
workspaceId: z.ZodGUID;
|
|
25
44
|
projectId: z.ZodGUID;
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import { z } from 'zod/v4';
|
|
2
|
-
import { LANGUAGE_SCHEMA } from './domainSchemas.js';
|
|
3
|
-
import { WORKSPACE_PROJECT_PATH_PARAMS_SCHEMA } from './pathParamsSchemas.js';
|
|
2
|
+
import { LANGUAGE_LEGACY_SCHEMA, LANGUAGE_SCHEMA } from './domainSchemas.js';
|
|
3
|
+
import { PROJECT_ONLY_PATH_PARAMS_SCHEMA, WORKSPACE_PROJECT_PATH_PARAMS_SCHEMA, } from './pathParamsSchemas.js';
|
|
4
4
|
// GET PROJECT LANGUAGES
|
|
5
|
-
export const GET_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA =
|
|
5
|
+
export const GET_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA = PROJECT_ONLY_PATH_PARAMS_SCHEMA;
|
|
6
6
|
export const GET_PROJECT_LANGUAGES_SUCCESS_RESPONSE_BODY = z.object({
|
|
7
|
-
data: z
|
|
7
|
+
data: z
|
|
8
|
+
.array(LANGUAGE_SCHEMA)
|
|
9
|
+
.describe('The languages of the project, the base language and every target language'),
|
|
10
|
+
});
|
|
11
|
+
// @deprecated Use `GET_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA` instead.
|
|
12
|
+
export const GET_PROJECT_LANGUAGES_PATH_PARAMS_LEGACY_SCHEMA = WORKSPACE_PROJECT_PATH_PARAMS_SCHEMA;
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated Use `GET_PROJECT_LANGUAGES_SUCCESS_RESPONSE_BODY` instead
|
|
15
|
+
*/
|
|
16
|
+
export const GET_PROJECT_LANGUAGES_LEGACY_SUCCESS_RESPONSE_BODY = z.object({
|
|
17
|
+
data: z.object({ languages: z.array(LANGUAGE_LEGACY_SCHEMA) }),
|
|
8
18
|
meta: z.object({ count: z.number().int().nonnegative() }),
|
|
9
19
|
});
|
|
10
20
|
// ADD PROJECT LANGUAGES
|
|
@@ -13,7 +23,7 @@ export const ADD_PROJECT_LANGUAGES_REQUEST_BODY_SCHEMA = z.object({
|
|
|
13
23
|
languages: z.array(z.object({ iso: z.string() })),
|
|
14
24
|
});
|
|
15
25
|
export const ADD_PROJECT_LANGUAGES_SUCCESS_RESPONSE_BODY = z.object({
|
|
16
|
-
data: z.object({ added: z.array(
|
|
26
|
+
data: z.object({ added: z.array(LANGUAGE_LEGACY_SCHEMA) }),
|
|
17
27
|
meta: z.object({ count: z.number().int().nonnegative() }),
|
|
18
28
|
});
|
|
19
29
|
// BULK UPDATE PROJECT LANGUAGES
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"languageSchemas.js","sourceRoot":"","sources":["../../src/schemas/languageSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"languageSchemas.js","sourceRoot":"","sources":["../../src/schemas/languageSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC1B,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAC5E,OAAO,EACL,+BAA+B,EAC/B,oCAAoC,GACrC,MAAM,wBAAwB,CAAA;AAE/B,wBAAwB;AACxB,MAAM,CAAC,MAAM,wCAAwC,GAAG,+BAA+B,CAAA;AAGvF,MAAM,CAAC,MAAM,2CAA2C,GAAG,CAAC,CAAC,MAAM,CAAC;IAClE,IAAI,EAAE,CAAC;SACJ,KAAK,CAAC,eAAe,CAAC;SACtB,QAAQ,CAAC,2EAA2E,CAAC;CACzF,CAAC,CAAA;AAKF,sEAAsE;AACtE,MAAM,CAAC,MAAM,+CAA+C,GAAG,oCAAoC,CAAA;AAMnG;;GAEG;AACH,MAAM,CAAC,MAAM,kDAAkD,GAAG,CAAC,CAAC,MAAM,CAAC;IACzE,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,sBAAsB,CAAC,EAAE,CAAC;IAC9D,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,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EMA: z.ZodObject<{
|
|
|
29
29
|
projectId: z.ZodGUID;
|
|
30
30
|
}, z.core.$strip>;
|
|
31
31
|
export type TeamProjectPathParams = z.infer<typeof TEAM_PROJECT_PATH_PARAMS_SCHEMA>;
|
|
32
|
+
export declare const PROJECT_ONLY_PATH_PARAMS_SCHEMA: z.ZodObject<{
|
|
33
|
+
projectId: z.ZodGUID;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export type ProjectOnlyPathParams = z.infer<typeof PROJECT_ONLY_PATH_PARAMS_SCHEMA>;
|
|
@@ -19,4 +19,7 @@ export const TEAM_PROJECT_PATH_PARAMS_SCHEMA = z.object({
|
|
|
19
19
|
teamId: z.guid().describe('The team UUID'),
|
|
20
20
|
projectId: z.guid().describe('The project UUID'),
|
|
21
21
|
});
|
|
22
|
+
export const PROJECT_ONLY_PATH_PARAMS_SCHEMA = z.object({
|
|
23
|
+
projectId: z.guid().describe('The project UUID'),
|
|
24
|
+
});
|
|
22
25
|
//# sourceMappingURL=pathParamsSchemas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pathParamsSchemas.js","sourceRoot":"","sources":["../../src/schemas/pathParamsSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,MAAM,CAAC;IACxD,WAAW,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,oBAAoB,CAAC;CACrD,CAAC,CAAA;AAMF,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC;CAC3C,CAAC,CAAA;AAGF;;GAEG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3D,WAAW,EAAE,CAAC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C1C,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;CACjD,CAAC,CAAA;AAGF,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IACtD,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;CACjD,CAAC,CAAA"}
|
|
@@ -37,14 +37,18 @@ export declare const GET_PROJECTS_SUCCESS_RESPONSE_BODY: z.ZodObject<{
|
|
|
37
37
|
name: z.ZodString;
|
|
38
38
|
description: z.ZodString;
|
|
39
39
|
baseLanguage: z.ZodObject<{
|
|
40
|
+
languageId: z.ZodUnion<readonly [z.ZodGUID, z.ZodNumber]>;
|
|
41
|
+
locale: z.ZodString;
|
|
42
|
+
systemLanguageId: z.ZodNumber;
|
|
40
43
|
projectLanguageId: z.ZodNumber;
|
|
41
|
-
languageId: z.ZodNumber;
|
|
42
44
|
languageIso: z.ZodString;
|
|
43
45
|
projectLanguageUuid: z.ZodGUID;
|
|
44
46
|
}, z.core.$strip>;
|
|
45
47
|
targetLanguages: z.ZodArray<z.ZodObject<{
|
|
48
|
+
languageId: z.ZodUnion<readonly [z.ZodGUID, z.ZodNumber]>;
|
|
49
|
+
locale: z.ZodString;
|
|
50
|
+
systemLanguageId: z.ZodNumber;
|
|
46
51
|
projectLanguageId: z.ZodNumber;
|
|
47
|
-
languageId: z.ZodNumber;
|
|
48
52
|
languageIso: z.ZodString;
|
|
49
53
|
projectLanguageUuid: z.ZodGUID;
|
|
50
54
|
}, z.core.$strip>>;
|
|
@@ -93,14 +97,18 @@ export declare const RETRIEVE_BATCH_PROJECTS_SUCCESS_RESPONSE_BODY: z.ZodObject<
|
|
|
93
97
|
name: z.ZodString;
|
|
94
98
|
description: z.ZodString;
|
|
95
99
|
baseLanguage: z.ZodObject<{
|
|
100
|
+
languageId: z.ZodUnion<readonly [z.ZodGUID, z.ZodNumber]>;
|
|
101
|
+
locale: z.ZodString;
|
|
102
|
+
systemLanguageId: z.ZodNumber;
|
|
96
103
|
projectLanguageId: z.ZodNumber;
|
|
97
|
-
languageId: z.ZodNumber;
|
|
98
104
|
languageIso: z.ZodString;
|
|
99
105
|
projectLanguageUuid: z.ZodGUID;
|
|
100
106
|
}, z.core.$strip>;
|
|
101
107
|
targetLanguages: z.ZodArray<z.ZodObject<{
|
|
108
|
+
languageId: z.ZodUnion<readonly [z.ZodGUID, z.ZodNumber]>;
|
|
109
|
+
locale: z.ZodString;
|
|
110
|
+
systemLanguageId: z.ZodNumber;
|
|
102
111
|
projectLanguageId: z.ZodNumber;
|
|
103
|
-
languageId: z.ZodNumber;
|
|
104
112
|
languageIso: z.ZodString;
|
|
105
113
|
projectLanguageUuid: z.ZodGUID;
|
|
106
114
|
}, z.core.$strip>>;
|
|
@@ -141,14 +149,18 @@ export declare const GET_PROJECT_SUCCESS_RESPONSE_BODY: z.ZodObject<{
|
|
|
141
149
|
name: z.ZodString;
|
|
142
150
|
description: z.ZodString;
|
|
143
151
|
baseLanguage: z.ZodObject<{
|
|
152
|
+
languageId: z.ZodUnion<readonly [z.ZodGUID, z.ZodNumber]>;
|
|
153
|
+
locale: z.ZodString;
|
|
154
|
+
systemLanguageId: z.ZodNumber;
|
|
144
155
|
projectLanguageId: z.ZodNumber;
|
|
145
|
-
languageId: z.ZodNumber;
|
|
146
156
|
languageIso: z.ZodString;
|
|
147
157
|
projectLanguageUuid: z.ZodGUID;
|
|
148
158
|
}, z.core.$strip>;
|
|
149
159
|
targetLanguages: z.ZodArray<z.ZodObject<{
|
|
160
|
+
languageId: z.ZodUnion<readonly [z.ZodGUID, z.ZodNumber]>;
|
|
161
|
+
locale: z.ZodString;
|
|
162
|
+
systemLanguageId: z.ZodNumber;
|
|
150
163
|
projectLanguageId: z.ZodNumber;
|
|
151
|
-
languageId: z.ZodNumber;
|
|
152
164
|
languageIso: z.ZodString;
|
|
153
165
|
projectLanguageUuid: z.ZodGUID;
|
|
154
166
|
}, z.core.$strip>>;
|
|
@@ -194,14 +206,18 @@ export declare const PATCH_PROJECT_SUCCESS_RESPONSE_BODY: z.ZodObject<{
|
|
|
194
206
|
name: z.ZodString;
|
|
195
207
|
description: z.ZodString;
|
|
196
208
|
baseLanguage: z.ZodObject<{
|
|
209
|
+
languageId: z.ZodUnion<readonly [z.ZodGUID, z.ZodNumber]>;
|
|
210
|
+
locale: z.ZodString;
|
|
211
|
+
systemLanguageId: z.ZodNumber;
|
|
197
212
|
projectLanguageId: z.ZodNumber;
|
|
198
|
-
languageId: z.ZodNumber;
|
|
199
213
|
languageIso: z.ZodString;
|
|
200
214
|
projectLanguageUuid: z.ZodGUID;
|
|
201
215
|
}, z.core.$strip>;
|
|
202
216
|
targetLanguages: z.ZodArray<z.ZodObject<{
|
|
217
|
+
languageId: z.ZodUnion<readonly [z.ZodGUID, z.ZodNumber]>;
|
|
218
|
+
locale: z.ZodString;
|
|
219
|
+
systemLanguageId: z.ZodNumber;
|
|
203
220
|
projectLanguageId: z.ZodNumber;
|
|
204
|
-
languageId: z.ZodNumber;
|
|
205
221
|
languageIso: z.ZodString;
|
|
206
222
|
projectLanguageUuid: z.ZodGUID;
|
|
207
223
|
}, z.core.$strip>>;
|