@lokalise/glossary-api-contracts 0.7.0 → 0.9.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/api/contracts/concepts/common.d.ts +2 -0
- package/dist/api/contracts/concepts/common.js +9 -0
- package/dist/api/contracts/concepts/common.js.map +1 -1
- package/dist/api/contracts/concepts/list-concepts.d.ts +2 -0
- package/dist/api/contracts/concepts/update-concept.d.ts +147 -0
- package/dist/api/contracts/concepts/update-concept.js +43 -0
- package/dist/api/contracts/concepts/update-concept.js.map +1 -0
- package/dist/api/contracts/glossaries/retrieve-glossaries-batch.d.ts +88 -0
- package/dist/api/contracts/glossaries/retrieve-glossaries-batch.js +44 -0
- package/dist/api/contracts/glossaries/retrieve-glossaries-batch.js.map +1 -0
- package/dist/api/contracts/index.d.ts +2 -0
- package/dist/api/contracts/index.js +2 -0
- package/dist/api/contracts/index.js.map +1 -1
- package/dist/api/errors/glossaryErrors.d.ts +10 -0
- package/dist/api/errors/glossaryErrors.js +4 -0
- package/dist/api/errors/glossaryErrors.js.map +1 -1
- package/package.json +1 -1
|
@@ -23,6 +23,7 @@ export declare const TERM_ATTRIBUTES_SCHEMA: z.ZodObject<{
|
|
|
23
23
|
caseSensitive: z.ZodOptional<z.ZodString>;
|
|
24
24
|
}, z.core.$strict>;
|
|
25
25
|
export type TermAttributes = z.infer<typeof TERM_ATTRIBUTES_SCHEMA>;
|
|
26
|
+
export declare const CONCEPT_DESCRIPTION_SCHEMA: z.ZodString;
|
|
26
27
|
export declare const CONCEPT_ID_SCHEMA: z.ZodUUID;
|
|
27
28
|
export type ConceptId = z.infer<typeof CONCEPT_ID_SCHEMA>;
|
|
28
29
|
export declare const TERM_ID_SCHEMA: z.ZodUUID;
|
|
@@ -55,6 +56,7 @@ export declare const TERM_SCHEMA: z.ZodObject<{
|
|
|
55
56
|
export type Term = z.infer<typeof TERM_SCHEMA>;
|
|
56
57
|
export declare const CONCEPT_SCHEMA: z.ZodObject<{
|
|
57
58
|
id: z.ZodUUID;
|
|
59
|
+
description: z.ZodNullable<z.ZodString>;
|
|
58
60
|
tags: z.ZodArray<z.ZodString>;
|
|
59
61
|
terms: z.ZodArray<z.ZodObject<{
|
|
60
62
|
id: z.ZodUUID;
|
|
@@ -31,6 +31,14 @@ export const TERM_ATTRIBUTES_SCHEMA = z
|
|
|
31
31
|
caseSensitive: ATTRIBUTE_VALUE_SCHEMA.optional().describe('Whether a match keeps the case of the term'),
|
|
32
32
|
})
|
|
33
33
|
.describe('Optional fields of the term that Lokalise defines');
|
|
34
|
+
export const CONCEPT_DESCRIPTION_SCHEMA = z
|
|
35
|
+
.string()
|
|
36
|
+
.min(1)
|
|
37
|
+
.max(MAX_DESCRIPTION_LENGTH)
|
|
38
|
+
.regex(/^\S(?:[\s\S]*\S)?$/, 'The description must not start or end with whitespace')
|
|
39
|
+
// Postgres cannot store the null character in a text column.
|
|
40
|
+
.refine((description) => !description.includes('\u0000'), 'The description must not contain the null character')
|
|
41
|
+
.describe('Description of the concept, without whitespace at the start or the end, and without the null character.');
|
|
34
42
|
export const CONCEPT_ID_SCHEMA = z.uuid().describe('ID of the concept');
|
|
35
43
|
export const TERM_ID_SCHEMA = z.uuid().describe('ID of the term');
|
|
36
44
|
// The field of the term schema adds `null` and the description.
|
|
@@ -47,6 +55,7 @@ export const TERM_SCHEMA = z.object({
|
|
|
47
55
|
});
|
|
48
56
|
export const CONCEPT_SCHEMA = z.object({
|
|
49
57
|
id: CONCEPT_ID_SCHEMA,
|
|
58
|
+
description: z.string().nullable().describe('Description of the concept'),
|
|
50
59
|
tags: z
|
|
51
60
|
.array(z.string().min(1).max(MAX_TAG_LENGTH))
|
|
52
61
|
.describe('Tags of the concept in byte order. Each tag applies to every term of the concept'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../src/api/contracts/concepts/common.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,QAAQ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AqC,CAAC;IAC1F,UAAU,EAAE,sBAAsB;CACnC,CAAC,CAAA;AAGF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,EAAE,EAAE,iBAAiB;IACrB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC;IACzE,IAAI,EAAE,CAAC;SACJ,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;SAC5C,QAAQ,CAAC,kFAAkF,CAAC;IAC/F,KAAK,EAAE,CAAC;SACL,KAAK,CAAC,WAAW,CAAC;SAClB,QAAQ,CACP,4FAA4F,CAC7F;CACJ,CAAC,CAAA"}
|
|
@@ -10,6 +10,7 @@ export type ListConceptsRequestQuery = z.input<typeof LIST_CONCEPTS_REQUEST_QUER
|
|
|
10
10
|
declare const LIST_CONCEPTS_RESPONSE_BODY_SCHEMA: z.ZodObject<{
|
|
11
11
|
data: z.ZodArray<z.ZodObject<{
|
|
12
12
|
id: z.ZodUUID;
|
|
13
|
+
description: z.ZodNullable<z.ZodString>;
|
|
13
14
|
tags: z.ZodArray<z.ZodString>;
|
|
14
15
|
terms: z.ZodArray<z.ZodObject<{
|
|
15
16
|
id: z.ZodUUID;
|
|
@@ -74,6 +75,7 @@ export declare const listConceptsContract: Omit<{
|
|
|
74
75
|
readonly 200: z.ZodObject<{
|
|
75
76
|
data: z.ZodArray<z.ZodObject<{
|
|
76
77
|
id: z.ZodUUID;
|
|
78
|
+
description: z.ZodNullable<z.ZodString>;
|
|
77
79
|
tags: z.ZodArray<z.ZodString>;
|
|
78
80
|
terms: z.ZodArray<z.ZodObject<{
|
|
79
81
|
id: z.ZodUUID;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import z from 'zod/v4';
|
|
2
|
+
declare const UPDATE_CONCEPT_REQUEST_BODY_SCHEMA: z.ZodObject<{
|
|
3
|
+
description: z.ZodNullable<z.ZodString>;
|
|
4
|
+
}, z.core.$strip>;
|
|
5
|
+
export type UpdateConceptRequestBody = z.infer<typeof UPDATE_CONCEPT_REQUEST_BODY_SCHEMA>;
|
|
6
|
+
declare const UPDATE_CONCEPT_RESPONSE_BODY_SCHEMA: z.ZodObject<{
|
|
7
|
+
id: z.ZodUUID;
|
|
8
|
+
description: z.ZodNullable<z.ZodString>;
|
|
9
|
+
tags: z.ZodArray<z.ZodString>;
|
|
10
|
+
terms: z.ZodArray<z.ZodObject<{
|
|
11
|
+
id: z.ZodUUID;
|
|
12
|
+
locale: z.ZodString;
|
|
13
|
+
text: z.ZodString;
|
|
14
|
+
kind: z.ZodEnum<{
|
|
15
|
+
readonly PREFERRED: 'preferred';
|
|
16
|
+
readonly ADMITTED: 'admitted';
|
|
17
|
+
readonly FORBIDDEN: 'forbidden';
|
|
18
|
+
readonly DO_NOT_TRANSLATE: 'do_not_translate';
|
|
19
|
+
}>;
|
|
20
|
+
status: z.ZodEnum<{
|
|
21
|
+
readonly ACTIVE: 'active';
|
|
22
|
+
readonly NEEDS_REVIEW: 'needs_review';
|
|
23
|
+
}>;
|
|
24
|
+
description: z.ZodNullable<z.ZodString>;
|
|
25
|
+
authorId: z.ZodNullable<z.ZodUUID>;
|
|
26
|
+
attributes: z.ZodObject<{
|
|
27
|
+
partOfSpeech: z.ZodOptional<z.ZodString>;
|
|
28
|
+
gender: z.ZodOptional<z.ZodString>;
|
|
29
|
+
plurals: z.ZodOptional<z.ZodString>;
|
|
30
|
+
caseSensitive: z.ZodOptional<z.ZodString>;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
}, z.core.$strip>>;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
export type UpdateConceptResponseBody = z.infer<typeof UPDATE_CONCEPT_RESPONSE_BODY_SCHEMA>;
|
|
35
|
+
export declare const updateConceptContract: Omit<{
|
|
36
|
+
readonly method: "patch";
|
|
37
|
+
readonly summary: "Change the description of a concept";
|
|
38
|
+
readonly description: "Sets the description of the concept, or removes it with `null`, and returns the concept with its tags and its terms.";
|
|
39
|
+
readonly tags: readonly ["Concepts"];
|
|
40
|
+
readonly visibility: "internal";
|
|
41
|
+
readonly requestPathParamsSchema: z.ZodObject<{
|
|
42
|
+
teamId: z.ZodUUID;
|
|
43
|
+
glossaryId: z.ZodUUID;
|
|
44
|
+
conceptId: z.ZodUUID;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
readonly requestBodySchema: z.ZodObject<{
|
|
47
|
+
description: z.ZodNullable<z.ZodString>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
readonly requestHeaderSchema: z.ZodObject<{
|
|
50
|
+
authorization: z.ZodOptional<z.ZodString>;
|
|
51
|
+
}, z.core.$loose>;
|
|
52
|
+
readonly pathResolver: (params: {
|
|
53
|
+
teamId: string;
|
|
54
|
+
glossaryId: string;
|
|
55
|
+
conceptId: string;
|
|
56
|
+
}) => `/v1/teams/${string}/glossaries/${string}/concepts/${string}`;
|
|
57
|
+
readonly responsesByStatusCode: {
|
|
58
|
+
readonly 400: z.ZodObject<{
|
|
59
|
+
message: z.ZodString;
|
|
60
|
+
errorCode: z.ZodString;
|
|
61
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
62
|
+
}, z.core.$strip>;
|
|
63
|
+
readonly 200: z.ZodObject<{
|
|
64
|
+
id: z.ZodUUID;
|
|
65
|
+
description: z.ZodNullable<z.ZodString>;
|
|
66
|
+
tags: z.ZodArray<z.ZodString>;
|
|
67
|
+
terms: z.ZodArray<z.ZodObject<{
|
|
68
|
+
id: z.ZodUUID;
|
|
69
|
+
locale: z.ZodString;
|
|
70
|
+
text: z.ZodString;
|
|
71
|
+
kind: z.ZodEnum<{
|
|
72
|
+
readonly PREFERRED: 'preferred';
|
|
73
|
+
readonly ADMITTED: 'admitted';
|
|
74
|
+
readonly FORBIDDEN: 'forbidden';
|
|
75
|
+
readonly DO_NOT_TRANSLATE: 'do_not_translate';
|
|
76
|
+
}>;
|
|
77
|
+
status: z.ZodEnum<{
|
|
78
|
+
readonly ACTIVE: 'active';
|
|
79
|
+
readonly NEEDS_REVIEW: 'needs_review';
|
|
80
|
+
}>;
|
|
81
|
+
description: z.ZodNullable<z.ZodString>;
|
|
82
|
+
authorId: z.ZodNullable<z.ZodUUID>;
|
|
83
|
+
attributes: z.ZodObject<{
|
|
84
|
+
partOfSpeech: z.ZodOptional<z.ZodString>;
|
|
85
|
+
gender: z.ZodOptional<z.ZodString>;
|
|
86
|
+
plurals: z.ZodOptional<z.ZodString>;
|
|
87
|
+
caseSensitive: z.ZodOptional<z.ZodString>;
|
|
88
|
+
}, z.core.$strict>;
|
|
89
|
+
}, z.core.$strip>>;
|
|
90
|
+
}, z.core.$strip>;
|
|
91
|
+
readonly '5xx': z.ZodObject<{
|
|
92
|
+
message: z.ZodString;
|
|
93
|
+
code: z.ZodString;
|
|
94
|
+
errorCode: z.ZodString;
|
|
95
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
96
|
+
}, z.core.$strip>;
|
|
97
|
+
readonly 401: z.ZodType<{
|
|
98
|
+
message: string;
|
|
99
|
+
code: "INVALID_CREDENTIALS";
|
|
100
|
+
errorCode: "INVALID_CREDENTIALS";
|
|
101
|
+
} | {
|
|
102
|
+
message: string;
|
|
103
|
+
code: "EXPIRED_CREDENTIALS";
|
|
104
|
+
errorCode: "EXPIRED_CREDENTIALS";
|
|
105
|
+
}, unknown, z.core.$ZodTypeInternals<{
|
|
106
|
+
message: string;
|
|
107
|
+
code: "INVALID_CREDENTIALS";
|
|
108
|
+
errorCode: "INVALID_CREDENTIALS";
|
|
109
|
+
} | {
|
|
110
|
+
message: string;
|
|
111
|
+
code: "EXPIRED_CREDENTIALS";
|
|
112
|
+
errorCode: "EXPIRED_CREDENTIALS";
|
|
113
|
+
}, unknown>>;
|
|
114
|
+
readonly 403: z.ZodType<{
|
|
115
|
+
message: string;
|
|
116
|
+
code: "INSUFFICIENT_TEAM_ROLE";
|
|
117
|
+
errorCode: "INSUFFICIENT_TEAM_ROLE";
|
|
118
|
+
}, unknown, z.core.$ZodTypeInternals<{
|
|
119
|
+
message: string;
|
|
120
|
+
code: "INSUFFICIENT_TEAM_ROLE";
|
|
121
|
+
errorCode: "INSUFFICIENT_TEAM_ROLE";
|
|
122
|
+
}, unknown>>;
|
|
123
|
+
readonly 404: z.ZodType<{
|
|
124
|
+
message: string;
|
|
125
|
+
code: "GLOSSARY_NOT_FOUND";
|
|
126
|
+
errorCode: "GLOSSARY_NOT_FOUND";
|
|
127
|
+
} | {
|
|
128
|
+
message: string;
|
|
129
|
+
code: "CONCEPT_NOT_FOUND";
|
|
130
|
+
errorCode: "CONCEPT_NOT_FOUND";
|
|
131
|
+
}, unknown, z.core.$ZodTypeInternals<{
|
|
132
|
+
message: string;
|
|
133
|
+
code: "GLOSSARY_NOT_FOUND";
|
|
134
|
+
errorCode: "GLOSSARY_NOT_FOUND";
|
|
135
|
+
} | {
|
|
136
|
+
message: string;
|
|
137
|
+
code: "CONCEPT_NOT_FOUND";
|
|
138
|
+
errorCode: "CONCEPT_NOT_FOUND";
|
|
139
|
+
}, unknown>>;
|
|
140
|
+
};
|
|
141
|
+
readonly metadata: {
|
|
142
|
+
expertAllowedTeamRoles: import("../../auth.ts").ExpertTeamRole[];
|
|
143
|
+
};
|
|
144
|
+
}, "visibility"> & {
|
|
145
|
+
visibility: import("@lokalise/api-contracts").RouteVisibility;
|
|
146
|
+
};
|
|
147
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { defineApiContract } from '@lokalise/api-contracts';
|
|
2
|
+
import { mergeErrorSchemasByStatusCode } from '@lokalise/errors';
|
|
3
|
+
import z from 'zod/v4';
|
|
4
|
+
import { EXPERT_ADMIN_ROLES } from '../../auth.js';
|
|
5
|
+
import { CONCEPT_NOT_FOUND_ERROR_DEFINITION, GLOSSARY_NOT_FOUND_ERROR_DEFINITION, } from '../../errors/index.js';
|
|
6
|
+
import { OpenApiTags } from '../../open-api-tags.js';
|
|
7
|
+
import { AUTH_ERROR_RESPONSES, AUTH_HEADERS, INTERNAL_SERVER_ERROR_RESPONSE_SCHEMA, TEAM_ID_SCHEMA, } from '../common.js';
|
|
8
|
+
import { GLOSSARY_ID_SCHEMA } from '../glossaries/common.js';
|
|
9
|
+
import { CONCEPT_DESCRIPTION_SCHEMA, CONCEPT_ID_SCHEMA, CONCEPT_SCHEMA } from './common.js';
|
|
10
|
+
// PATCH /v1/teams/:teamId/glossaries/:glossaryId/concepts/:conceptId
|
|
11
|
+
const UPDATE_CONCEPT_REQUEST_PARAMS_SCHEMA = z.compile(z.object({
|
|
12
|
+
teamId: TEAM_ID_SCHEMA,
|
|
13
|
+
glossaryId: GLOSSARY_ID_SCHEMA,
|
|
14
|
+
conceptId: CONCEPT_ID_SCHEMA,
|
|
15
|
+
}));
|
|
16
|
+
const UPDATE_CONCEPT_REQUEST_BODY_SCHEMA = z.compile(z.object({
|
|
17
|
+
description: CONCEPT_DESCRIPTION_SCHEMA.nullable().describe('New description of the concept, or `null` to remove the description'),
|
|
18
|
+
}));
|
|
19
|
+
const UPDATE_CONCEPT_RESPONSE_BODY_SCHEMA = z.compile(CONCEPT_SCHEMA);
|
|
20
|
+
export const updateConceptContract = defineApiContract({
|
|
21
|
+
method: 'patch',
|
|
22
|
+
summary: 'Change the description of a concept',
|
|
23
|
+
description: 'Sets the description of the concept, or removes it with `null`, and returns the concept with its tags and its terms.',
|
|
24
|
+
tags: [OpenApiTags.Concepts.name],
|
|
25
|
+
visibility: 'internal',
|
|
26
|
+
requestPathParamsSchema: UPDATE_CONCEPT_REQUEST_PARAMS_SCHEMA,
|
|
27
|
+
requestBodySchema: UPDATE_CONCEPT_REQUEST_BODY_SCHEMA,
|
|
28
|
+
requestHeaderSchema: AUTH_HEADERS,
|
|
29
|
+
pathResolver: (params) => `/v1/teams/${params.teamId}/glossaries/${params.glossaryId}/concepts/${params.conceptId}`,
|
|
30
|
+
responsesByStatusCode: {
|
|
31
|
+
200: UPDATE_CONCEPT_RESPONSE_BODY_SCHEMA,
|
|
32
|
+
...AUTH_ERROR_RESPONSES,
|
|
33
|
+
...mergeErrorSchemasByStatusCode([
|
|
34
|
+
GLOSSARY_NOT_FOUND_ERROR_DEFINITION,
|
|
35
|
+
CONCEPT_NOT_FOUND_ERROR_DEFINITION,
|
|
36
|
+
]),
|
|
37
|
+
'5xx': INTERNAL_SERVER_ERROR_RESPONSE_SCHEMA,
|
|
38
|
+
},
|
|
39
|
+
metadata: {
|
|
40
|
+
expertAllowedTeamRoles: EXPERT_ADMIN_ROLES,
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=update-concept.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-concept.js","sourceRoot":"","sources":["../../../../src/api/contracts/concepts/update-concept.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAA;AAChE,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EAAE,kBAAkB,EAAoC,MAAM,eAAe,CAAA;AACpF,OAAO,EACL,kCAAkC,EAClC,mCAAmC,GACpC,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,qCAAqC,EACrC,cAAc,GACf,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAC5D,OAAO,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE3F,qEAAqE;AACrE,MAAM,oCAAoC,GAAG,CAAC,CAAC,OAAO,CACpD,CAAC,CAAC,MAAM,CAAC;IACP,MAAM,EAAE,cAAc;IACtB,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|
6
|
+
export type RetrieveGlossariesBatchRequestBody = z.infer<typeof RETRIEVE_GLOSSARIES_BATCH_REQUEST_BODY_SCHEMA>;
|
|
7
|
+
declare const BATCH_GLOSSARY_SCHEMA: z.ZodObject<{
|
|
8
|
+
id: z.ZodUUID;
|
|
9
|
+
name: z.ZodString;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export type BatchGlossary = z.infer<typeof BATCH_GLOSSARY_SCHEMA>;
|
|
12
|
+
declare const RETRIEVE_GLOSSARIES_BATCH_RESPONSE_BODY_SCHEMA: z.ZodObject<{
|
|
13
|
+
data: z.ZodArray<z.ZodObject<{
|
|
14
|
+
id: z.ZodUUID;
|
|
15
|
+
name: z.ZodString;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
export type RetrieveGlossariesBatchResponseBody = z.infer<typeof RETRIEVE_GLOSSARIES_BATCH_RESPONSE_BODY_SCHEMA>;
|
|
19
|
+
export declare const retrieveGlossariesBatchContract: Omit<{
|
|
20
|
+
readonly method: "post";
|
|
21
|
+
readonly summary: "Read the glossaries of a team for a list of IDs";
|
|
22
|
+
readonly description: "Returns the ID and the name of the glossaries of a team, filtered by IDs and sorted by name, regardless of case. The service compares the IDs regardless of case, and the response has each ID in lower case. The response has a glossary one time when the list repeats its ID. The response does not have an entry for an ID that is not a glossary of the team.";
|
|
23
|
+
readonly tags: readonly ["Glossaries"];
|
|
24
|
+
readonly visibility: "internal";
|
|
25
|
+
readonly requestPathParamsSchema: z.ZodObject<{
|
|
26
|
+
teamId: z.ZodUUID;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
readonly requestBodySchema: z.ZodObject<{
|
|
29
|
+
glossaryIds: z.ZodArray<z.ZodUUID>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
readonly requestHeaderSchema: z.ZodObject<{
|
|
32
|
+
authorization: z.ZodOptional<z.ZodString>;
|
|
33
|
+
}, z.core.$loose>;
|
|
34
|
+
readonly pathResolver: (params: {
|
|
35
|
+
teamId: string;
|
|
36
|
+
}) => `/v1/teams/${string}/glossaries/batch`;
|
|
37
|
+
readonly responsesByStatusCode: {
|
|
38
|
+
readonly 400: z.ZodObject<{
|
|
39
|
+
message: z.ZodString;
|
|
40
|
+
errorCode: z.ZodString;
|
|
41
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
readonly 200: z.ZodObject<{
|
|
44
|
+
data: z.ZodArray<z.ZodObject<{
|
|
45
|
+
id: z.ZodUUID;
|
|
46
|
+
name: z.ZodString;
|
|
47
|
+
}, z.core.$strip>>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
readonly '5xx': z.ZodObject<{
|
|
50
|
+
message: z.ZodString;
|
|
51
|
+
code: z.ZodString;
|
|
52
|
+
errorCode: z.ZodString;
|
|
53
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
readonly 401: z.ZodType<{
|
|
56
|
+
message: string;
|
|
57
|
+
code: "INVALID_CREDENTIALS";
|
|
58
|
+
errorCode: "INVALID_CREDENTIALS";
|
|
59
|
+
} | {
|
|
60
|
+
message: string;
|
|
61
|
+
code: "EXPIRED_CREDENTIALS";
|
|
62
|
+
errorCode: "EXPIRED_CREDENTIALS";
|
|
63
|
+
}, unknown, z.core.$ZodTypeInternals<{
|
|
64
|
+
message: string;
|
|
65
|
+
code: "INVALID_CREDENTIALS";
|
|
66
|
+
errorCode: "INVALID_CREDENTIALS";
|
|
67
|
+
} | {
|
|
68
|
+
message: string;
|
|
69
|
+
code: "EXPIRED_CREDENTIALS";
|
|
70
|
+
errorCode: "EXPIRED_CREDENTIALS";
|
|
71
|
+
}, unknown>>;
|
|
72
|
+
readonly 403: z.ZodType<{
|
|
73
|
+
message: string;
|
|
74
|
+
code: "INSUFFICIENT_TEAM_ROLE";
|
|
75
|
+
errorCode: "INSUFFICIENT_TEAM_ROLE";
|
|
76
|
+
}, unknown, z.core.$ZodTypeInternals<{
|
|
77
|
+
message: string;
|
|
78
|
+
code: "INSUFFICIENT_TEAM_ROLE";
|
|
79
|
+
errorCode: "INSUFFICIENT_TEAM_ROLE";
|
|
80
|
+
}, unknown>>;
|
|
81
|
+
};
|
|
82
|
+
readonly metadata: {
|
|
83
|
+
expertAllowedTeamRoles: import("../../auth.ts").ExpertTeamRole[];
|
|
84
|
+
};
|
|
85
|
+
}, "visibility"> & {
|
|
86
|
+
visibility: import("@lokalise/api-contracts").RouteVisibility;
|
|
87
|
+
};
|
|
88
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { defineApiContract } from '@lokalise/api-contracts';
|
|
2
|
+
import z from 'zod/v4';
|
|
3
|
+
import { EXPERT_ADMIN_ROLES } from '../../auth.js';
|
|
4
|
+
import { OpenApiTags } from '../../open-api-tags.js';
|
|
5
|
+
import { AUTH_ERROR_RESPONSES, AUTH_HEADERS, INTERNAL_SERVER_ERROR_RESPONSE_SCHEMA, TEAM_ID_SCHEMA, } from '../common.js';
|
|
6
|
+
import { GLOSSARY_ID_SCHEMA, GLOSSARY_SCHEMA } from './common.js';
|
|
7
|
+
// POST /v1/teams/:teamId/glossaries/batch
|
|
8
|
+
const RETRIEVE_GLOSSARIES_BATCH_REQUEST_PARAMS_SCHEMA = z.compile(z.object({
|
|
9
|
+
teamId: TEAM_ID_SCHEMA,
|
|
10
|
+
}));
|
|
11
|
+
export const MAX_GLOSSARY_IDS_PER_BATCH = 100;
|
|
12
|
+
const RETRIEVE_GLOSSARIES_BATCH_REQUEST_BODY_SCHEMA = z.compile(z.object({
|
|
13
|
+
glossaryIds: z
|
|
14
|
+
.array(GLOSSARY_ID_SCHEMA)
|
|
15
|
+
.min(1)
|
|
16
|
+
.max(MAX_GLOSSARY_IDS_PER_BATCH)
|
|
17
|
+
.describe('IDs of the glossaries to read. The limit counts a repeated ID each time.'),
|
|
18
|
+
}));
|
|
19
|
+
const BATCH_GLOSSARY_SCHEMA = GLOSSARY_SCHEMA.pick({ id: true, name: true });
|
|
20
|
+
const RETRIEVE_GLOSSARIES_BATCH_RESPONSE_BODY_SCHEMA = z.compile(z.object({
|
|
21
|
+
data: z
|
|
22
|
+
.array(BATCH_GLOSSARY_SCHEMA)
|
|
23
|
+
.describe('Glossaries of the team with the IDs, by name, regardless of case'),
|
|
24
|
+
}));
|
|
25
|
+
export const retrieveGlossariesBatchContract = defineApiContract({
|
|
26
|
+
method: 'post',
|
|
27
|
+
summary: 'Read the glossaries of a team for a list of IDs',
|
|
28
|
+
description: 'Returns the ID and the name of the glossaries of a team, filtered by IDs and sorted by name, regardless of case. The service compares the IDs regardless of case, and the response has each ID in lower case. The response has a glossary one time when the list repeats its ID. The response does not have an entry for an ID that is not a glossary of the team.',
|
|
29
|
+
tags: [OpenApiTags.Glossaries.name],
|
|
30
|
+
visibility: 'internal',
|
|
31
|
+
requestPathParamsSchema: RETRIEVE_GLOSSARIES_BATCH_REQUEST_PARAMS_SCHEMA,
|
|
32
|
+
requestBodySchema: RETRIEVE_GLOSSARIES_BATCH_REQUEST_BODY_SCHEMA,
|
|
33
|
+
requestHeaderSchema: AUTH_HEADERS,
|
|
34
|
+
pathResolver: (params) => `/v1/teams/${params.teamId}/glossaries/batch`,
|
|
35
|
+
responsesByStatusCode: {
|
|
36
|
+
200: RETRIEVE_GLOSSARIES_BATCH_RESPONSE_BODY_SCHEMA,
|
|
37
|
+
...AUTH_ERROR_RESPONSES,
|
|
38
|
+
'5xx': INTERNAL_SERVER_ERROR_RESPONSE_SCHEMA,
|
|
39
|
+
},
|
|
40
|
+
metadata: {
|
|
41
|
+
expertAllowedTeamRoles: EXPERT_ADMIN_ROLES,
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
//# sourceMappingURL=retrieve-glossaries-batch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retrieve-glossaries-batch.js","sourceRoot":"","sources":["../../../../src/api/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iD;IAC1D,WAAW,EACT,oWAAoW;IACtW,IAAI,EAAE,CAAC,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC;IACnC,UAAU,EAAE,UAAU;IACtB,uBAAuB,EAAE,+CAA+C;IACxE,iBAAiB,EAAE,6CAA6C;IAChE,mBAAmB,EAAE,YAAY;IACjC,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,aAAa,MAAM,CAAC,MAAM,mBAAmB;IACvE,qBAAqB,EAAE;QACrB,GAAG,EAAE,8CAA8C;QACnD,GAAG,oBAAoB;QACvB,KAAK,EAAE,qCAAqC;KAC7C;IACD,QAAQ,EAAE;QACR,sBAAsB,EAAE,kBAAkB;KACL;CACxC,CAAC,CAAA"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export * from './common.ts';
|
|
2
2
|
export * from './concepts/common.ts';
|
|
3
3
|
export * from './concepts/list-concepts.ts';
|
|
4
|
+
export * from './concepts/update-concept.ts';
|
|
4
5
|
export * from './glossaries/common.ts';
|
|
5
6
|
export * from './glossaries/confirm-import-upload-completion.ts';
|
|
6
7
|
export * from './glossaries/create-glossary.ts';
|
|
7
8
|
export * from './glossaries/create-import-upload-form.ts';
|
|
8
9
|
export * from './glossaries/get-glossary.ts';
|
|
9
10
|
export * from './glossaries/list-glossaries.ts';
|
|
11
|
+
export * from './glossaries/retrieve-glossaries-batch.ts';
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export * from './common.js';
|
|
2
2
|
export * from './concepts/common.js';
|
|
3
3
|
export * from './concepts/list-concepts.js';
|
|
4
|
+
export * from './concepts/update-concept.js';
|
|
4
5
|
export * from './glossaries/common.js';
|
|
5
6
|
export * from './glossaries/confirm-import-upload-completion.js';
|
|
6
7
|
export * from './glossaries/create-glossary.js';
|
|
7
8
|
export * from './glossaries/create-import-upload-form.js';
|
|
8
9
|
export * from './glossaries/get-glossary.js';
|
|
9
10
|
export * from './glossaries/list-glossaries.js';
|
|
11
|
+
export * from './glossaries/retrieve-glossaries-batch.js';
|
|
10
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/contracts/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,sBAAsB,CAAA;AACpC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,wBAAwB,CAAA;AACtC,cAAc,kDAAkD,CAAA;AAChE,cAAc,iCAAiC,CAAA;AAC/C,cAAc,2CAA2C,CAAA;AACzD,cAAc,8BAA8B,CAAA;AAC5C,cAAc,iCAAiC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/contracts/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,sBAAsB,CAAA;AACpC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,wBAAwB,CAAA;AACtC,cAAc,kDAAkD,CAAA;AAChE,cAAc,iCAAiC,CAAA;AAC/C,cAAc,2CAA2C,CAAA;AACzD,cAAc,8BAA8B,CAAA;AAC5C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,2CAA2C,CAAA"}
|
|
@@ -18,6 +18,16 @@ export declare const GLOSSARY_NOT_FOUND_ERROR_DEFINITION: {
|
|
|
18
18
|
errorCode: import("zod").ZodLiteral<"GLOSSARY_NOT_FOUND">;
|
|
19
19
|
}, import("zod/v4/core").$strip>;
|
|
20
20
|
};
|
|
21
|
+
export declare const CONCEPT_NOT_FOUND_ERROR_DEFINITION: {
|
|
22
|
+
readonly code: "CONCEPT_NOT_FOUND";
|
|
23
|
+
readonly type: "not-found";
|
|
24
|
+
} & {
|
|
25
|
+
schema: import("zod").ZodObject<{
|
|
26
|
+
message: import("zod").ZodString;
|
|
27
|
+
code: import("zod").ZodLiteral<"CONCEPT_NOT_FOUND">;
|
|
28
|
+
errorCode: import("zod").ZodLiteral<"CONCEPT_NOT_FOUND">;
|
|
29
|
+
}, import("zod/v4/core").$strip>;
|
|
30
|
+
};
|
|
21
31
|
export declare const INVALID_IMPORT_FILE_ERROR_DEFINITION: {
|
|
22
32
|
readonly code: "INVALID_IMPORT_FILE";
|
|
23
33
|
readonly type: "bad-request";
|
|
@@ -8,6 +8,10 @@ export const GLOSSARY_NOT_FOUND_ERROR_DEFINITION = definePublicError({
|
|
|
8
8
|
code: 'GLOSSARY_NOT_FOUND',
|
|
9
9
|
type: ErrorType.NOT_FOUND,
|
|
10
10
|
});
|
|
11
|
+
export const CONCEPT_NOT_FOUND_ERROR_DEFINITION = definePublicError({
|
|
12
|
+
code: 'CONCEPT_NOT_FOUND',
|
|
13
|
+
type: ErrorType.NOT_FOUND,
|
|
14
|
+
});
|
|
11
15
|
export const INVALID_IMPORT_FILE_ERROR_DEFINITION = definePublicError({
|
|
12
16
|
code: 'INVALID_IMPORT_FILE',
|
|
13
17
|
type: ErrorType.BAD_REQUEST,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glossaryErrors.js","sourceRoot":"","sources":["../../../src/api/errors/glossaryErrors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAE/D,uFAAuF;AACvF,MAAM,CAAC,MAAM,oCAAoC,GAAG,iBAAiB,CAAC;IACpE,IAAI,EAAE,qBAAqB;IAC3B,IAAI,EAAE,SAAS,CAAC,QAAQ;CACzB,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,mCAAmC,GAAG,iBAAiB,CAAC;IACnE,IAAI,EAAE,oBAAoB;IAC1B,IAAI,EAAE,SAAS,CAAC,SAAS;CAC1B,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,oCAAoC,GAAG,iBAAiB,CAAC;IACpE,IAAI,EAAE,qBAAqB;IAC3B,IAAI,EAAE,SAAS,CAAC,WAAW;CAC5B,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,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