@lokalise/workspaces-api-schemas 5.2.4 → 5.3.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.
|
@@ -192,3 +192,79 @@ export declare const getContributorsListContract: import("@lokalise/api-contract
|
|
|
192
192
|
}, z.core.$strip>>;
|
|
193
193
|
}, z.core.$strip>;
|
|
194
194
|
}>;
|
|
195
|
+
export declare const postExpertAddContributorsContract: import("@lokalise/api-contracts").PayloadRouteDefinition<z.ZodObject<{
|
|
196
|
+
contributors: z.ZodArray<z.ZodObject<{
|
|
197
|
+
email: z.ZodEmail;
|
|
198
|
+
fullname: z.ZodOptional<z.ZodString>;
|
|
199
|
+
is_admin: z.ZodOptional<z.ZodBoolean>;
|
|
200
|
+
is_reviewer: z.ZodOptional<z.ZodBoolean>;
|
|
201
|
+
role_id: z.ZodOptional<z.ZodNumber>;
|
|
202
|
+
admin_rights: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
203
|
+
languages: z.ZodArray<z.ZodObject<{
|
|
204
|
+
lang_iso: z.ZodString;
|
|
205
|
+
is_writable: z.ZodOptional<z.ZodBoolean>;
|
|
206
|
+
}, z.core.$strip>>;
|
|
207
|
+
}, z.core.$strip>>;
|
|
208
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
209
|
+
project_id: z.ZodString;
|
|
210
|
+
project_uuid: z.ZodString;
|
|
211
|
+
contributors: z.ZodArray<z.ZodObject<{
|
|
212
|
+
user_id: z.ZodNumber;
|
|
213
|
+
user_uuid: z.ZodOptional<z.ZodUUID>;
|
|
214
|
+
email: z.ZodEmail;
|
|
215
|
+
fullname: z.ZodString;
|
|
216
|
+
avatar_url: z.ZodString;
|
|
217
|
+
created_at: z.ZodString;
|
|
218
|
+
created_at_timestamp: z.ZodNumber;
|
|
219
|
+
languages: z.ZodArray<z.ZodObject<{
|
|
220
|
+
lang_id: z.ZodNumber;
|
|
221
|
+
lang_iso: z.ZodString;
|
|
222
|
+
lang_name: z.ZodString;
|
|
223
|
+
is_writable: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodBoolean]>;
|
|
224
|
+
}, z.core.$strip>>;
|
|
225
|
+
admin_rights: z.ZodArray<z.ZodString>;
|
|
226
|
+
permissions: z.ZodArray<z.ZodString>;
|
|
227
|
+
role_id: z.ZodNullable<z.ZodNumber>;
|
|
228
|
+
is_owner: z.ZodBoolean;
|
|
229
|
+
is_admin: z.ZodBoolean;
|
|
230
|
+
is_reviewer: z.ZodBoolean;
|
|
231
|
+
is_pending: z.ZodBoolean;
|
|
232
|
+
is_reinvited: z.ZodBoolean;
|
|
233
|
+
}, z.core.$strip>>;
|
|
234
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
235
|
+
projectId: z.ZodString;
|
|
236
|
+
}, z.core.$strip>, undefined, z.ZodUnion<readonly [z.ZodObject<{
|
|
237
|
+
Authorization: z.ZodString;
|
|
238
|
+
'Content-Type': z.ZodLiteral<"application/json">;
|
|
239
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
240
|
+
authorization: z.ZodString;
|
|
241
|
+
'content-type': z.ZodLiteral<"application/json">;
|
|
242
|
+
}, z.core.$strip>]>, undefined, false, false, {
|
|
243
|
+
200: z.ZodObject<{
|
|
244
|
+
project_id: z.ZodString;
|
|
245
|
+
project_uuid: z.ZodString;
|
|
246
|
+
contributors: z.ZodArray<z.ZodObject<{
|
|
247
|
+
user_id: z.ZodNumber;
|
|
248
|
+
user_uuid: z.ZodOptional<z.ZodUUID>;
|
|
249
|
+
email: z.ZodEmail;
|
|
250
|
+
fullname: z.ZodString;
|
|
251
|
+
avatar_url: z.ZodString;
|
|
252
|
+
created_at: z.ZodString;
|
|
253
|
+
created_at_timestamp: z.ZodNumber;
|
|
254
|
+
languages: z.ZodArray<z.ZodObject<{
|
|
255
|
+
lang_id: z.ZodNumber;
|
|
256
|
+
lang_iso: z.ZodString;
|
|
257
|
+
lang_name: z.ZodString;
|
|
258
|
+
is_writable: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodBoolean]>;
|
|
259
|
+
}, z.core.$strip>>;
|
|
260
|
+
admin_rights: z.ZodArray<z.ZodString>;
|
|
261
|
+
permissions: z.ZodArray<z.ZodString>;
|
|
262
|
+
role_id: z.ZodNullable<z.ZodNumber>;
|
|
263
|
+
is_owner: z.ZodBoolean;
|
|
264
|
+
is_admin: z.ZodBoolean;
|
|
265
|
+
is_reviewer: z.ZodBoolean;
|
|
266
|
+
is_pending: z.ZodBoolean;
|
|
267
|
+
is_reinvited: z.ZodBoolean;
|
|
268
|
+
}, z.core.$strip>>;
|
|
269
|
+
}, z.core.$strip>;
|
|
270
|
+
}>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { buildGetRoute } from '@lokalise/api-contracts';
|
|
1
|
+
import { buildGetRoute, buildPayloadRoute } from '@lokalise/api-contracts';
|
|
2
2
|
import { z } from 'zod/v4';
|
|
3
|
+
import { ADD_CONTRIBUTORS_REQUEST_BODY_SCHEMA, ADD_CONTRIBUTORS_RESPONSE_SCHEMA, } from "../../types/contributorTypes.js";
|
|
3
4
|
import { EXPERT_AUTHORIZATION_HEADER_SCHEMA, EXPERT_MANDATORY_PAGINATION_SCHEMA, PROJECT_ID_REQUEST_PARAM_SCHEMA, } from "./common.js";
|
|
4
5
|
export const PROJECT_CONTRIBUTOR_SCHEMA = z.object({
|
|
5
6
|
user_id: z.number(),
|
|
@@ -62,4 +63,19 @@ export const getContributorsListContract = buildGetRoute({
|
|
|
62
63
|
},
|
|
63
64
|
requestHeaderSchema: EXPERT_AUTHORIZATION_HEADER_SCHEMA,
|
|
64
65
|
});
|
|
66
|
+
// ---------------------------------------------------
|
|
67
|
+
// POST /api2/projects/:projectId/contributors
|
|
68
|
+
// ---------------------------------------------------
|
|
69
|
+
export const postExpertAddContributorsContract = buildPayloadRoute({
|
|
70
|
+
method: 'post',
|
|
71
|
+
pathResolver: (params) => `/api2/projects/${params.projectId}/contributors`,
|
|
72
|
+
description: 'Add contributors to project',
|
|
73
|
+
requestPathParamsSchema: PROJECT_ID_REQUEST_PARAM_SCHEMA,
|
|
74
|
+
requestHeaderSchema: EXPERT_AUTHORIZATION_HEADER_SCHEMA,
|
|
75
|
+
requestBodySchema: ADD_CONTRIBUTORS_REQUEST_BODY_SCHEMA,
|
|
76
|
+
successResponseBodySchema: ADD_CONTRIBUTORS_RESPONSE_SCHEMA,
|
|
77
|
+
responseSchemasByStatusCode: {
|
|
78
|
+
200: ADD_CONTRIBUTORS_RESPONSE_SCHEMA,
|
|
79
|
+
},
|
|
80
|
+
});
|
|
65
81
|
//# sourceMappingURL=contributors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contributors.js","sourceRoot":"","sources":["../../../src/schemas/expert/contributors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"contributors.js","sourceRoot":"","sources":["../../../src/schemas/expert/contributors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC1E,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC1B,OAAO,EACL,oCAAoC,EACpC,gCAAgC,GACjC,MAAM,iCAAiC,CAAA;AACxC,OAAO,EACL,kCAAkC,EAClC,kCAAkC,EAClC,+BAA+B,GAChC,MAAM,aAAa,CAAA;AAEpB,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE;IACnB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;IACrB,WAAW,EAAE,CAAC,CAAC,O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