@lokalise/workspaces-api-schemas 5.2.2 → 5.2.4
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/schemas/expert/common.d.ts +5 -2
- package/dist/schemas/expert/common.js +10 -4
- package/dist/schemas/expert/common.js.map +1 -1
- package/dist/schemas/expert/contributors.d.ts +10 -4
- package/dist/schemas/expert/project-languages.d.ts +5 -2
- package/dist/schemas/expert/projects.d.ts +15 -6
- package/dist/schemas/expert/style-guides.d.ts +5 -2
- package/dist/schemas/expert/tasks.d.ts +5 -2
- package/dist/schemas/expert/users.d.ts +30 -12
- package/dist/types/suggestedContributorTypes.d.ts +20 -24
- package/dist/types/suggestedContributorTypes.js +5 -1
- package/dist/types/suggestedContributorTypes.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,10 +3,13 @@ export declare const PROJECT_ID_REQUEST_PARAM_SCHEMA: z.ZodObject<{
|
|
|
3
3
|
projectId: z.ZodString;
|
|
4
4
|
}, z.core.$strip>;
|
|
5
5
|
export type ProjectIdRequestParam = z.infer<typeof PROJECT_ID_REQUEST_PARAM_SCHEMA>;
|
|
6
|
-
export declare const EXPERT_AUTHORIZATION_HEADER_SCHEMA: z.ZodObject<{
|
|
6
|
+
export declare const EXPERT_AUTHORIZATION_HEADER_SCHEMA: z.ZodUnion<readonly [z.ZodObject<{
|
|
7
7
|
Authorization: z.ZodString;
|
|
8
8
|
'Content-Type': z.ZodLiteral<"application/json">;
|
|
9
|
-
}, z.core.$strip
|
|
9
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
10
|
+
authorization: z.ZodString;
|
|
11
|
+
'content-type': z.ZodLiteral<"application/json">;
|
|
12
|
+
}, z.core.$strip>]>;
|
|
10
13
|
export type ExpertAuthorizationHeader = z.infer<typeof EXPERT_AUTHORIZATION_HEADER_SCHEMA>;
|
|
11
14
|
export declare const EXPERT_PAGE_HEADER_SCHEMA: z.ZodObject<{
|
|
12
15
|
'x-pagination-total-count': z.ZodCoercedNumber<unknown>;
|
|
@@ -2,10 +2,16 @@ import { z } from 'zod/v4';
|
|
|
2
2
|
export const PROJECT_ID_REQUEST_PARAM_SCHEMA = z.object({
|
|
3
3
|
projectId: z.string(),
|
|
4
4
|
});
|
|
5
|
-
export const EXPERT_AUTHORIZATION_HEADER_SCHEMA = z.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
export const EXPERT_AUTHORIZATION_HEADER_SCHEMA = z.union([
|
|
6
|
+
z.object({
|
|
7
|
+
Authorization: z.string().min(1),
|
|
8
|
+
'Content-Type': z.literal('application/json'),
|
|
9
|
+
}),
|
|
10
|
+
z.object({
|
|
11
|
+
authorization: z.string().min(1),
|
|
12
|
+
'content-type': z.literal('application/json'),
|
|
13
|
+
}),
|
|
14
|
+
]);
|
|
9
15
|
export const EXPERT_PAGE_HEADER_SCHEMA = z.object({
|
|
10
16
|
'x-pagination-total-count': z.coerce.number(),
|
|
11
17
|
'x-pagination-page-count': z.coerce.number(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/schemas/expert/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IACtD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAA;AAGF,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/schemas/expert/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IACtD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAA;AAGF,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC;IACxD,CAAC,CAAC,MAAM,CAAC;QACP,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAChC,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;KAC9C,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACP,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAChC,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;KAC9C,CAAC;CACH,CAAC,CAAA;AAIF,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,0BAA0B,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE;IAC7C,yBAAyB,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE;IAC5C,oBAAoB,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE;IACvC,mBAAmB,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE;IACtC,oBAAoB,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE;CACnD,CAAC,CAAA;AAGF,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC,MAAM,CAAC;IACzD,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;CAC5C,CAAC,CAAA"}
|
|
@@ -76,10 +76,13 @@ export declare const getContributorDataContract: import("@lokalise/api-contracts
|
|
|
76
76
|
}, z.core.$strip>, z.ZodObject<{
|
|
77
77
|
projectId: z.ZodString;
|
|
78
78
|
userId: z.ZodString;
|
|
79
|
-
}, z.core.$strip>, undefined, z.ZodObject<{
|
|
79
|
+
}, z.core.$strip>, undefined, z.ZodUnion<readonly [z.ZodObject<{
|
|
80
80
|
Authorization: z.ZodString;
|
|
81
81
|
'Content-Type': z.ZodLiteral<"application/json">;
|
|
82
|
-
}, z.core.$strip>,
|
|
82
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
83
|
+
authorization: z.ZodString;
|
|
84
|
+
'content-type': z.ZodLiteral<"application/json">;
|
|
85
|
+
}, z.core.$strip>]>, undefined, false, false, {
|
|
83
86
|
200: z.ZodObject<{
|
|
84
87
|
project_id: z.ZodString;
|
|
85
88
|
project_uuid: z.ZodGUID;
|
|
@@ -157,10 +160,13 @@ export declare const getContributorsListContract: import("@lokalise/api-contract
|
|
|
157
160
|
projectId: z.ZodString;
|
|
158
161
|
}, z.core.$strip>, z.ZodObject<{
|
|
159
162
|
page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
160
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
163
|
+
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
161
164
|
Authorization: z.ZodString;
|
|
162
165
|
'Content-Type': z.ZodLiteral<"application/json">;
|
|
163
|
-
}, z.core.$strip>,
|
|
166
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
167
|
+
authorization: z.ZodString;
|
|
168
|
+
'content-type': z.ZodLiteral<"application/json">;
|
|
169
|
+
}, z.core.$strip>]>, undefined, false, false, {
|
|
164
170
|
200: z.ZodObject<{
|
|
165
171
|
project_id: z.ZodString;
|
|
166
172
|
project_uuid: z.ZodGUID;
|
|
@@ -42,10 +42,13 @@ export declare const getExpertProjectLanguagesContract: import("@lokalise/api-co
|
|
|
42
42
|
projectId: z.ZodString;
|
|
43
43
|
}, z.core.$strip>, z.ZodObject<{
|
|
44
44
|
page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
45
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
45
|
+
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
46
46
|
Authorization: z.ZodString;
|
|
47
47
|
'Content-Type': z.ZodLiteral<"application/json">;
|
|
48
|
-
}, z.core.$strip>,
|
|
48
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
49
|
+
authorization: z.ZodString;
|
|
50
|
+
'content-type': z.ZodLiteral<"application/json">;
|
|
51
|
+
}, z.core.$strip>]>, undefined, false, false, {
|
|
49
52
|
200: z.ZodObject<{
|
|
50
53
|
project_id: z.ZodString;
|
|
51
54
|
project_uuid: z.ZodGUID;
|
|
@@ -127,10 +127,13 @@ export declare const getExpertProjectContract: import("@lokalise/api-contracts")
|
|
|
127
127
|
}, z.core.$strip>;
|
|
128
128
|
}, z.core.$strip>, z.ZodObject<{
|
|
129
129
|
projectId: z.ZodString;
|
|
130
|
-
}, z.core.$strip>, undefined, z.ZodObject<{
|
|
130
|
+
}, z.core.$strip>, undefined, z.ZodUnion<readonly [z.ZodObject<{
|
|
131
131
|
Authorization: z.ZodString;
|
|
132
132
|
'Content-Type': z.ZodLiteral<"application/json">;
|
|
133
|
-
}, z.core.$strip>,
|
|
133
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
134
|
+
authorization: z.ZodString;
|
|
135
|
+
'content-type': z.ZodLiteral<"application/json">;
|
|
136
|
+
}, z.core.$strip>]>, undefined, false, false, {
|
|
134
137
|
200: z.ZodObject<{
|
|
135
138
|
project_id: z.ZodString;
|
|
136
139
|
uuid: z.ZodNullable<z.ZodGUID>;
|
|
@@ -333,10 +336,13 @@ export declare const getExpertTeamProjectsContract: import("@lokalise/api-contra
|
|
|
333
336
|
}, z.core.$strip>, undefined, z.ZodObject<{
|
|
334
337
|
page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
335
338
|
filter_team_id: z.ZodGUID;
|
|
336
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
339
|
+
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
337
340
|
Authorization: z.ZodString;
|
|
338
341
|
'Content-Type': z.ZodLiteral<"application/json">;
|
|
339
|
-
}, z.core.$strip>,
|
|
342
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
343
|
+
authorization: z.ZodString;
|
|
344
|
+
'content-type': z.ZodLiteral<"application/json">;
|
|
345
|
+
}, z.core.$strip>]>, undefined, false, false, {
|
|
340
346
|
200: z.ZodObject<{
|
|
341
347
|
projects: z.ZodArray<z.ZodObject<{
|
|
342
348
|
project_id: z.ZodString;
|
|
@@ -577,10 +583,13 @@ export declare const postExpertCreateProjectContract: import("@lokalise/api-cont
|
|
|
577
583
|
project_language_uuid: z.ZodGUID;
|
|
578
584
|
}, z.core.$strip>>;
|
|
579
585
|
}, z.core.$strip>>;
|
|
580
|
-
}, z.core.$strip>, undefined, undefined, z.ZodObject<{
|
|
586
|
+
}, z.core.$strip>, undefined, undefined, z.ZodUnion<readonly [z.ZodObject<{
|
|
581
587
|
Authorization: z.ZodString;
|
|
582
588
|
'Content-Type': z.ZodLiteral<"application/json">;
|
|
583
|
-
}, z.core.$strip>,
|
|
589
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
590
|
+
authorization: z.ZodString;
|
|
591
|
+
'content-type': z.ZodLiteral<"application/json">;
|
|
592
|
+
}, z.core.$strip>]>, undefined, false, false, {
|
|
584
593
|
200: z.ZodObject<{
|
|
585
594
|
project_id: z.ZodString;
|
|
586
595
|
uuid: z.ZodGUID;
|
|
@@ -36,10 +36,13 @@ export declare const getExpertStyleGuidesContract: import("@lokalise/api-contrac
|
|
|
36
36
|
created_by: z.ZodNumber;
|
|
37
37
|
}, z.core.$strip>>, z.ZodObject<{
|
|
38
38
|
projectUuid: z.ZodUUID;
|
|
39
|
-
}, z.core.$strip>, undefined, z.ZodObject<{
|
|
39
|
+
}, z.core.$strip>, undefined, z.ZodUnion<readonly [z.ZodObject<{
|
|
40
40
|
Authorization: z.ZodString;
|
|
41
41
|
'Content-Type': z.ZodLiteral<"application/json">;
|
|
42
|
-
}, z.core.$strip>,
|
|
42
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
43
|
+
authorization: z.ZodString;
|
|
44
|
+
'content-type': z.ZodLiteral<"application/json">;
|
|
45
|
+
}, z.core.$strip>]>, undefined, false, false, {
|
|
43
46
|
200: z.ZodArray<z.ZodObject<{
|
|
44
47
|
id: z.ZodUUID;
|
|
45
48
|
name: z.ZodString;
|
|
@@ -337,10 +337,13 @@ export declare const getExpertTaskContract: import("@lokalise/api-contracts").Ge
|
|
|
337
337
|
}, z.core.$strip>, z.ZodObject<{
|
|
338
338
|
taskId: z.ZodNumber;
|
|
339
339
|
projectUuid: z.ZodUUID;
|
|
340
|
-
}, z.core.$strip>, undefined, z.ZodObject<{
|
|
340
|
+
}, z.core.$strip>, undefined, z.ZodUnion<readonly [z.ZodObject<{
|
|
341
341
|
Authorization: z.ZodString;
|
|
342
342
|
'Content-Type': z.ZodLiteral<"application/json">;
|
|
343
|
-
}, z.core.$strip>,
|
|
343
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
344
|
+
authorization: z.ZodString;
|
|
345
|
+
'content-type': z.ZodLiteral<"application/json">;
|
|
346
|
+
}, z.core.$strip>]>, undefined, false, false, {
|
|
344
347
|
200: z.ZodObject<{
|
|
345
348
|
project_id: z.ZodString;
|
|
346
349
|
project_uuid: z.ZodUUID;
|
|
@@ -17,10 +17,13 @@ export declare const getUserContract: import("@lokalise/api-contracts").GetRoute
|
|
|
17
17
|
email: z.ZodString;
|
|
18
18
|
}, z.core.$strip>, z.ZodObject<{
|
|
19
19
|
userId: z.ZodGUID;
|
|
20
|
-
}, z.core.$strip>, undefined, z.ZodObject<{
|
|
20
|
+
}, z.core.$strip>, undefined, z.ZodUnion<readonly [z.ZodObject<{
|
|
21
21
|
Authorization: z.ZodString;
|
|
22
22
|
'Content-Type': z.ZodLiteral<"application/json">;
|
|
23
|
-
}, z.core.$strip>,
|
|
23
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
24
|
+
authorization: z.ZodString;
|
|
25
|
+
'content-type': z.ZodLiteral<"application/json">;
|
|
26
|
+
}, z.core.$strip>]>, undefined, false, false, {
|
|
24
27
|
200: z.ZodObject<{
|
|
25
28
|
id: z.ZodNumber;
|
|
26
29
|
uuid: z.ZodGUID;
|
|
@@ -67,10 +70,13 @@ export declare const getUserNotificationSettingsContract: import("@lokalise/api-
|
|
|
67
70
|
service: z.ZodBoolean;
|
|
68
71
|
}, z.core.$strip>, z.ZodObject<{
|
|
69
72
|
userId: z.ZodGUID;
|
|
70
|
-
}, z.core.$strip>, undefined, z.ZodObject<{
|
|
73
|
+
}, z.core.$strip>, undefined, z.ZodUnion<readonly [z.ZodObject<{
|
|
71
74
|
Authorization: z.ZodString;
|
|
72
75
|
'Content-Type': z.ZodLiteral<"application/json">;
|
|
73
|
-
}, z.core.$strip>,
|
|
76
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
77
|
+
authorization: z.ZodString;
|
|
78
|
+
'content-type': z.ZodLiteral<"application/json">;
|
|
79
|
+
}, z.core.$strip>]>, undefined, false, false, {
|
|
74
80
|
200: z.ZodObject<{
|
|
75
81
|
ai_word_limit: z.ZodBoolean;
|
|
76
82
|
contribution: z.ZodBoolean;
|
|
@@ -119,10 +125,13 @@ export declare const getUsersNotificationSettingsContract: import("@lokalise/api
|
|
|
119
125
|
translators: z.ZodBoolean;
|
|
120
126
|
service: z.ZodBoolean;
|
|
121
127
|
}, z.core.$strip>;
|
|
122
|
-
}, z.core.$strip>>, undefined, undefined, z.ZodObject<{
|
|
128
|
+
}, z.core.$strip>>, undefined, undefined, z.ZodUnion<readonly [z.ZodObject<{
|
|
123
129
|
Authorization: z.ZodString;
|
|
124
130
|
'Content-Type': z.ZodLiteral<"application/json">;
|
|
125
|
-
}, z.core.$strip>,
|
|
131
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
132
|
+
authorization: z.ZodString;
|
|
133
|
+
'content-type': z.ZodLiteral<"application/json">;
|
|
134
|
+
}, z.core.$strip>]>, undefined, false, false, {
|
|
126
135
|
200: z.ZodArray<z.ZodObject<{
|
|
127
136
|
user_id: z.ZodNumber;
|
|
128
137
|
user_uuid: z.ZodUUID;
|
|
@@ -183,10 +192,13 @@ export declare const getTeamUsersContract: import("@lokalise/api-contracts").Get
|
|
|
183
192
|
teamId: z.ZodString;
|
|
184
193
|
}, z.core.$strip>, z.ZodObject<{
|
|
185
194
|
page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
186
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
195
|
+
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
187
196
|
Authorization: z.ZodString;
|
|
188
197
|
'Content-Type': z.ZodLiteral<"application/json">;
|
|
189
|
-
}, z.core.$strip>,
|
|
198
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
199
|
+
authorization: z.ZodString;
|
|
200
|
+
'content-type': z.ZodLiteral<"application/json">;
|
|
201
|
+
}, z.core.$strip>]>, undefined, false, false, {
|
|
190
202
|
200: z.ZodObject<{
|
|
191
203
|
team_id: z.ZodNumber;
|
|
192
204
|
team_uuid: z.ZodGUID;
|
|
@@ -235,10 +247,13 @@ export declare const getTeamUserContract: import("@lokalise/api-contracts").GetR
|
|
|
235
247
|
}, z.core.$strip>, z.ZodObject<{
|
|
236
248
|
teamId: z.ZodString;
|
|
237
249
|
userId: z.ZodString;
|
|
238
|
-
}, z.core.$strip>, undefined, z.ZodObject<{
|
|
250
|
+
}, z.core.$strip>, undefined, z.ZodUnion<readonly [z.ZodObject<{
|
|
239
251
|
Authorization: z.ZodString;
|
|
240
252
|
'Content-Type': z.ZodLiteral<"application/json">;
|
|
241
|
-
}, z.core.$strip>,
|
|
253
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
254
|
+
authorization: z.ZodString;
|
|
255
|
+
'content-type': z.ZodLiteral<"application/json">;
|
|
256
|
+
}, z.core.$strip>]>, undefined, false, false, {
|
|
242
257
|
200: z.ZodObject<{
|
|
243
258
|
team_id: z.ZodNumber;
|
|
244
259
|
team_uuid: z.ZodGUID;
|
|
@@ -340,10 +355,13 @@ export declare const getTeamUserGroupsContract: import("@lokalise/api-contracts"
|
|
|
340
355
|
teamId: z.ZodString;
|
|
341
356
|
}, z.core.$strip>, z.ZodObject<{
|
|
342
357
|
page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
343
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
358
|
+
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
344
359
|
Authorization: z.ZodString;
|
|
345
360
|
'Content-Type': z.ZodLiteral<"application/json">;
|
|
346
|
-
}, z.core.$strip>,
|
|
361
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
362
|
+
authorization: z.ZodString;
|
|
363
|
+
'content-type': z.ZodLiteral<"application/json">;
|
|
364
|
+
}, z.core.$strip>]>, undefined, false, false, {
|
|
347
365
|
200: z.ZodObject<{
|
|
348
366
|
team_id: z.ZodNumber;
|
|
349
367
|
team_uuid: z.ZodGUID;
|
|
@@ -26,12 +26,6 @@ export declare const SUGGESTED_DEFAULT_CONTRIBUTOR_SCHEMA: z.ZodObject<{
|
|
|
26
26
|
email: z.ZodEmail;
|
|
27
27
|
fullname: z.ZodString;
|
|
28
28
|
avatar_url: z.ZodString;
|
|
29
|
-
languages: z.ZodArray<z.ZodObject<{
|
|
30
|
-
lang_id: z.ZodNumber;
|
|
31
|
-
lang_iso: z.ZodString;
|
|
32
|
-
lang_name: z.ZodString;
|
|
33
|
-
is_writable: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodBoolean]>;
|
|
34
|
-
}, z.core.$strip>>;
|
|
35
29
|
role_id: z.ZodNullable<z.ZodNumber>;
|
|
36
30
|
is_owner: z.ZodBoolean;
|
|
37
31
|
is_admin: z.ZodBoolean;
|
|
@@ -39,6 +33,11 @@ export declare const SUGGESTED_DEFAULT_CONTRIBUTOR_SCHEMA: z.ZodObject<{
|
|
|
39
33
|
last_logged_in_at: z.ZodNullable<z.ZodISODateTime>;
|
|
40
34
|
last_logged_in_at_timestamp: z.ZodNullable<z.ZodNumber>;
|
|
41
35
|
team_role: z.ZodString;
|
|
36
|
+
languages: z.ZodArray<z.ZodObject<{
|
|
37
|
+
lang_iso: z.ZodString;
|
|
38
|
+
lang_name: z.ZodString;
|
|
39
|
+
is_writable: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodBoolean]>;
|
|
40
|
+
}, z.core.$strip>>;
|
|
42
41
|
}, z.core.$strip>;
|
|
43
42
|
export declare const SUGGESTED_CONTRIBUTORS_LANGUAGE_SCHEMA: z.ZodObject<{
|
|
44
43
|
lang_iso: z.ZodString;
|
|
@@ -49,12 +48,6 @@ export declare const SUGGESTED_CONTRIBUTORS_LANGUAGE_SCHEMA: z.ZodObject<{
|
|
|
49
48
|
email: z.ZodEmail;
|
|
50
49
|
fullname: z.ZodString;
|
|
51
50
|
avatar_url: z.ZodString;
|
|
52
|
-
languages: z.ZodArray<z.ZodObject<{
|
|
53
|
-
lang_id: z.ZodNumber;
|
|
54
|
-
lang_iso: z.ZodString;
|
|
55
|
-
lang_name: z.ZodString;
|
|
56
|
-
is_writable: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodBoolean]>;
|
|
57
|
-
}, z.core.$strip>>;
|
|
58
51
|
role_id: z.ZodNullable<z.ZodNumber>;
|
|
59
52
|
is_owner: z.ZodBoolean;
|
|
60
53
|
is_admin: z.ZodBoolean;
|
|
@@ -62,6 +55,11 @@ export declare const SUGGESTED_CONTRIBUTORS_LANGUAGE_SCHEMA: z.ZodObject<{
|
|
|
62
55
|
last_logged_in_at: z.ZodNullable<z.ZodISODateTime>;
|
|
63
56
|
last_logged_in_at_timestamp: z.ZodNullable<z.ZodNumber>;
|
|
64
57
|
team_role: z.ZodString;
|
|
58
|
+
languages: z.ZodArray<z.ZodObject<{
|
|
59
|
+
lang_iso: z.ZodString;
|
|
60
|
+
lang_name: z.ZodString;
|
|
61
|
+
is_writable: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodBoolean]>;
|
|
62
|
+
}, z.core.$strip>>;
|
|
65
63
|
}, z.core.$strip>>;
|
|
66
64
|
total: z.ZodNumber;
|
|
67
65
|
}, z.core.$strip>;
|
|
@@ -86,12 +84,6 @@ export declare const LIST_SUGGESTED_CONTRIBUTORS_TEAM_RESPONSE_SCHEMA: z.ZodObje
|
|
|
86
84
|
email: z.ZodEmail;
|
|
87
85
|
fullname: z.ZodString;
|
|
88
86
|
avatar_url: z.ZodString;
|
|
89
|
-
languages: z.ZodArray<z.ZodObject<{
|
|
90
|
-
lang_id: z.ZodNumber;
|
|
91
|
-
lang_iso: z.ZodString;
|
|
92
|
-
lang_name: z.ZodString;
|
|
93
|
-
is_writable: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodBoolean]>;
|
|
94
|
-
}, z.core.$strip>>;
|
|
95
87
|
role_id: z.ZodNullable<z.ZodNumber>;
|
|
96
88
|
is_owner: z.ZodBoolean;
|
|
97
89
|
is_admin: z.ZodBoolean;
|
|
@@ -99,6 +91,11 @@ export declare const LIST_SUGGESTED_CONTRIBUTORS_TEAM_RESPONSE_SCHEMA: z.ZodObje
|
|
|
99
91
|
last_logged_in_at: z.ZodNullable<z.ZodISODateTime>;
|
|
100
92
|
last_logged_in_at_timestamp: z.ZodNullable<z.ZodNumber>;
|
|
101
93
|
team_role: z.ZodString;
|
|
94
|
+
languages: z.ZodArray<z.ZodObject<{
|
|
95
|
+
lang_iso: z.ZodString;
|
|
96
|
+
lang_name: z.ZodString;
|
|
97
|
+
is_writable: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodBoolean]>;
|
|
98
|
+
}, z.core.$strip>>;
|
|
102
99
|
}, z.core.$strip>>;
|
|
103
100
|
total: z.ZodNumber;
|
|
104
101
|
}, z.core.$strip>>;
|
|
@@ -117,12 +114,6 @@ export declare const LIST_SUGGESTED_CONTRIBUTORS_PROJECT_RESPONSE_SCHEMA: z.ZodO
|
|
|
117
114
|
email: z.ZodEmail;
|
|
118
115
|
fullname: z.ZodString;
|
|
119
116
|
avatar_url: z.ZodString;
|
|
120
|
-
languages: z.ZodArray<z.ZodObject<{
|
|
121
|
-
lang_id: z.ZodNumber;
|
|
122
|
-
lang_iso: z.ZodString;
|
|
123
|
-
lang_name: z.ZodString;
|
|
124
|
-
is_writable: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodBoolean]>;
|
|
125
|
-
}, z.core.$strip>>;
|
|
126
117
|
role_id: z.ZodNullable<z.ZodNumber>;
|
|
127
118
|
is_owner: z.ZodBoolean;
|
|
128
119
|
is_admin: z.ZodBoolean;
|
|
@@ -130,6 +121,11 @@ export declare const LIST_SUGGESTED_CONTRIBUTORS_PROJECT_RESPONSE_SCHEMA: z.ZodO
|
|
|
130
121
|
last_logged_in_at: z.ZodNullable<z.ZodISODateTime>;
|
|
131
122
|
last_logged_in_at_timestamp: z.ZodNullable<z.ZodNumber>;
|
|
132
123
|
team_role: z.ZodString;
|
|
124
|
+
languages: z.ZodArray<z.ZodObject<{
|
|
125
|
+
lang_iso: z.ZodString;
|
|
126
|
+
lang_name: z.ZodString;
|
|
127
|
+
is_writable: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodBoolean]>;
|
|
128
|
+
}, z.core.$strip>>;
|
|
133
129
|
}, z.core.$strip>>;
|
|
134
130
|
total: z.ZodNumber;
|
|
135
131
|
}, z.core.$strip>>;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { BASE_API_ENDPOINT_HEADER_SCHEMA } from '@lokalise/common-api-schemas';
|
|
2
2
|
import { z } from 'zod/v4';
|
|
3
|
-
import { CONTRIBUTOR_SCHEMA } from "./contributorTypes.js";
|
|
3
|
+
import { CONTRIBUTOR_LANGUAGE_SCHEMA, CONTRIBUTOR_SCHEMA } from "./contributorTypes.js";
|
|
4
4
|
export const SUGGESTED_CONTRIBUTORS_API_BASE_HEADER_SCHEMA = BASE_API_ENDPOINT_HEADER_SCHEMA;
|
|
5
5
|
const LOCALE_KEY = z.string().regex(/^[a-z]{2}(_[A-Z]{2})?$/); // e.g. en, fr_FR, etc.
|
|
6
|
+
const SUGGESTED_CONTRIBUTOR_LANGUAGE_SCHEMA = CONTRIBUTOR_LANGUAGE_SCHEMA.omit({
|
|
7
|
+
lang_id: true,
|
|
8
|
+
});
|
|
6
9
|
export const SUGGESTED_DEFAULT_CONTRIBUTOR_SCHEMA = CONTRIBUTOR_SCHEMA.omit({
|
|
7
10
|
admin_rights: true,
|
|
8
11
|
permissions: true,
|
|
@@ -14,6 +17,7 @@ export const SUGGESTED_DEFAULT_CONTRIBUTOR_SCHEMA = CONTRIBUTOR_SCHEMA.omit({
|
|
|
14
17
|
last_logged_in_at: z.iso.datetime().nullable(),
|
|
15
18
|
last_logged_in_at_timestamp: z.number().nullable(),
|
|
16
19
|
team_role: z.string(),
|
|
20
|
+
languages: z.array(SUGGESTED_CONTRIBUTOR_LANGUAGE_SCHEMA),
|
|
17
21
|
});
|
|
18
22
|
export const SUGGESTED_CONTRIBUTORS_LANGUAGE_SCHEMA = z.object({
|
|
19
23
|
lang_iso: z.string(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggestedContributorTypes.js","sourceRoot":"","sources":["../../src/types/suggestedContributorTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,8BAA8B,CAAA;AAC9E,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"suggestedContributorTypes.js","sourceRoot":"","sources":["../../src/types/suggestedContributorTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,8BAA8B,CAAA;AAC9E,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B,OAAO,EAAE,2BAA2B,EA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