@lokalise/translation-storage-api-schemas 9.3.0 → 9.4.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.
@@ -0,0 +1,46 @@
1
+ import { z } from 'zod/v4';
2
+ declare const GET_EDITOR_ACCESSIBLE_LOCALES_REQUEST_PARAMS_SCHEMA: z.ZodObject<{
3
+ projectId: z.ZodGUID;
4
+ }, z.core.$strip>;
5
+ export type GetEditorAccessibleLocalesRequestParams = z.infer<typeof GET_EDITOR_ACCESSIBLE_LOCALES_REQUEST_PARAMS_SCHEMA>;
6
+ declare const GET_EDITOR_ACCESSIBLE_LOCALES_RESPONSE_SCHEMA: z.ZodObject<{
7
+ data: z.ZodObject<{
8
+ accessibleLocales: z.ZodArray<z.ZodString>;
9
+ }, z.core.$strip>;
10
+ }, z.core.$strip>;
11
+ export type GetEditorAccessibleLocalesResponse = z.infer<typeof GET_EDITOR_ACCESSIBLE_LOCALES_RESPONSE_SCHEMA>;
12
+ export declare const getEditorAccessibleLocalesContract: import("@lokalise/api-contracts").GetRouteDefinition<z.ZodObject<{
13
+ data: z.ZodObject<{
14
+ accessibleLocales: z.ZodArray<z.ZodString>;
15
+ }, z.core.$strip>;
16
+ }, z.core.$strip>, z.ZodObject<{
17
+ projectId: z.ZodGUID;
18
+ }, z.core.$strip>, undefined, z.ZodAny, undefined, false, false, {
19
+ 200: z.ZodObject<{
20
+ data: z.ZodObject<{
21
+ accessibleLocales: z.ZodArray<z.ZodString>;
22
+ }, z.core.$strip>;
23
+ }, z.core.$strip>;
24
+ 404: z.ZodObject<{
25
+ message: z.ZodString;
26
+ errorCode: z.ZodString;
27
+ details: z.ZodOptional<z.ZodAny>;
28
+ }, z.core.$strip>;
29
+ 400: z.ZodObject<{
30
+ message: z.ZodString;
31
+ errorCode: z.ZodString;
32
+ details: z.ZodOptional<z.ZodAny>;
33
+ }, z.core.$strip>;
34
+ 401: z.ZodObject<{
35
+ message: z.ZodString;
36
+ errorCode: z.ZodString;
37
+ details: z.ZodOptional<z.ZodAny>;
38
+ }, z.core.$strip>;
39
+ 403: z.ZodObject<{
40
+ message: z.ZodString;
41
+ errorCode: z.ZodString;
42
+ details: z.ZodOptional<z.ZodAny>;
43
+ }, z.core.$strip>;
44
+ }>;
45
+ export {};
46
+ //# sourceMappingURL=get-editor-accessible-locales.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-editor-accessible-locales.d.ts","sourceRoot":"","sources":["../../../../src/api/contracts/editor/get-editor-accessible-locales.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAK1B,QAAA,MAAM,mDAAmD;;iBAEvD,CAAA;AACF,MAAM,MAAM,uCAAuC,GAAG,CAAC,CAAC,KAAK,CAC3D,OAAO,mDAAmD,CAC3D,CAAA;AAED,QAAA,MAAM,6CAA6C;;;;iBAIjD,CAAA;AACF,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CACtD,OAAO,6CAA6C,CACrD,CAAA;AAED,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAe7C,CAAA"}
@@ -0,0 +1,33 @@
1
+ import { COMMON_ERROR_RESPONSE_SCHEMA } from '@lokalise/api-common';
2
+ import { buildRestContract } from '@lokalise/api-contracts';
3
+ import { ALL_ROLES } from '@lokalise/autopilot-common-api-schemas';
4
+ import { commonErrorResponses } from '@lokalise/common-api-schemas';
5
+ import { z } from 'zod/v4';
6
+ // ------------------------------------------
7
+ // GET /v1/projects/:projectId/editor/accessible-locales
8
+ // ------------------------------------------
9
+ const GET_EDITOR_ACCESSIBLE_LOCALES_REQUEST_PARAMS_SCHEMA = z.object({
10
+ projectId: z.guid(),
11
+ });
12
+ const GET_EDITOR_ACCESSIBLE_LOCALES_RESPONSE_SCHEMA = z.object({
13
+ data: z.object({
14
+ accessibleLocales: z.array(z.string()),
15
+ }),
16
+ });
17
+ export const getEditorAccessibleLocalesContract = buildRestContract({
18
+ method: 'get',
19
+ requestPathParamsSchema: GET_EDITOR_ACCESSIBLE_LOCALES_REQUEST_PARAMS_SCHEMA,
20
+ requestHeaderSchema: z.any(),
21
+ pathResolver: (params) => `/v1/projects/${params.projectId}/editor/accessible-locales`,
22
+ description: 'Get the locales the current user is allowed to review in the given project',
23
+ successResponseBodySchema: GET_EDITOR_ACCESSIBLE_LOCALES_RESPONSE_SCHEMA,
24
+ metadata: {
25
+ allowedWorkspaceRoles: ALL_ROLES,
26
+ },
27
+ responseSchemasByStatusCode: {
28
+ ...commonErrorResponses,
29
+ 200: GET_EDITOR_ACCESSIBLE_LOCALES_RESPONSE_SCHEMA,
30
+ 404: COMMON_ERROR_RESPONSE_SCHEMA,
31
+ },
32
+ });
33
+ //# sourceMappingURL=get-editor-accessible-locales.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-editor-accessible-locales.js","sourceRoot":"","sources":["../../../../src/api/contracts/editor/get-editor-accessible-locales.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAA;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B,6CAA6C;AAC7C,wDAAwD;AACxD,6CAA6C;AAC7C,MAAM,mDAAmD,GAAG,CAAC,CAAC,MAAM,CAAC;IACnE,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE;CACpB,CAAC,CAAA;AAKF,MAAM,6CAA6C,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7D,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;QACb,iBAAiB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;KACvC,CAAC;CACH,CAAC,CAAA;AAKF,MAAM,CAAC,MAAM,kCAAkC,GAAG,iBAAiB,CAAC;IAClE,MAAM,EAAE,KAAK;IACb,uBAAuB,EAAE,mDAAmD;IAC5E,mBAAmB,EAAE,CAAC,CAAC,GAAG,EAAE;IAC5B,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,gBAAgB,MAAM,CAAC,SAAS,4BAA4B;IACtF,WAAW,EAAE,4EAA4E;IACzF,yBAAyB,EAAE,6CAA6C;IACxE,QAAQ,EAAE;QACR,qBAAqB,EAAE,SAAS;KACjC;IACD,2BAA2B,EAAE;QAC3B,GAAG,oBAAoB;QACvB,GAAG,EAAE,6CAA6C;QAClD,GAAG,EAAE,4BAA4B;KAClC;CACF,CAAC,CAAA"}
@@ -5,6 +5,7 @@ export * from './content-manager/patch-import-settings.ts';
5
5
  export * from './content-manager/post-import-settings.ts';
6
6
  export * from './default-reviewers/get-project-default-reviewers.ts';
7
7
  export * from './default-reviewers/post-project-default-reviewers.ts';
8
+ export * from './editor/get-editor-accessible-locales.ts';
8
9
  export * from './editor/get-editor-content.ts';
9
10
  export * from './editor/get-editor-content-filters.ts';
10
11
  export * from './editor/get-editor-items-summary.ts';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/contracts/index.ts"],"names":[],"mappings":"AAAA,cAAc,4CAA4C,CAAA;AAC1D,cAAc,0CAA0C,CAAA;AACxD,cAAc,8CAA8C,CAAA;AAC5D,cAAc,4CAA4C,CAAA;AAC1D,cAAc,2CAA2C,CAAA;AACzD,cAAc,sDAAsD,CAAA;AACpE,cAAc,uDAAuD,CAAA;AACrE,cAAc,gCAAgC,CAAA;AAC9C,cAAc,wCAAwC,CAAA;AACtD,cAAc,sCAAsC,CAAA;AACpD,cAAc,gEAAgE,CAAA;AAC9E,cAAc,sDAAsD,CAAA;AACpE,cAAc,oEAAoE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/contracts/index.ts"],"names":[],"mappings":"AAAA,cAAc,4CAA4C,CAAA;AAC1D,cAAc,0CAA0C,CAAA;AACxD,cAAc,8CAA8C,CAAA;AAC5D,cAAc,4CAA4C,CAAA;AAC1D,cAAc,2CAA2C,CAAA;AACzD,cAAc,sDAAsD,CAAA;AACpE,cAAc,uDAAuD,CAAA;AACrE,cAAc,2CAA2C,CAAA;AACzD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,wCAAwC,CAAA;AACtD,cAAc,sCAAsC,CAAA;AACpD,cAAc,gEAAgE,CAAA;AAC9E,cAAc,sDAAsD,CAAA;AACpE,cAAc,oEAAoE,CAAA"}
@@ -5,6 +5,7 @@ export * from "./content-manager/patch-import-settings.js";
5
5
  export * from "./content-manager/post-import-settings.js";
6
6
  export * from "./default-reviewers/get-project-default-reviewers.js";
7
7
  export * from "./default-reviewers/post-project-default-reviewers.js";
8
+ export * from "./editor/get-editor-accessible-locales.js";
8
9
  export * from "./editor/get-editor-content.js";
9
10
  export * from "./editor/get-editor-content-filters.js";
10
11
  export * from "./editor/get-editor-items-summary.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/contracts/index.ts"],"names":[],"mappings":"AAAA,cAAc,4CAA4C,CAAA;AAC1D,cAAc,0CAA0C,CAAA;AACxD,cAAc,8CAA8C,CAAA;AAC5D,cAAc,4CAA4C,CAAA;AAC1D,cAAc,2CAA2C,CAAA;AACzD,cAAc,sDAAsD,CAAA;AACpE,cAAc,uDAAuD,CAAA;AACrE,cAAc,gCAAgC,CAAA;AAC9C,cAAc,wCAAwC,CAAA;AACtD,cAAc,sCAAsC,CAAA;AACpD,cAAc,gEAAgE,CAAA;AAC9E,cAAc,sDAAsD,CAAA;AACpE,cAAc,oEAAoE,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/contracts/index.ts"],"names":[],"mappings":"AAAA,cAAc,4CAA4C,CAAA;AAC1D,cAAc,0CAA0C,CAAA;AACxD,cAAc,8CAA8C,CAAA;AAC5D,cAAc,4CAA4C,CAAA;AAC1D,cAAc,2CAA2C,CAAA;AACzD,cAAc,sDAAsD,CAAA;AACpE,cAAc,uDAAuD,CAAA;AACrE,cAAc,2CAA2C,CAAA;AACzD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,wCAAwC,CAAA;AACtD,cAAc,sCAAsC,CAAA;AACpD,cAAc,gEAAgE,CAAA;AAC9E,cAAc,sDAAsD,CAAA;AACpE,cAAc,oEAAoE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokalise/translation-storage-api-schemas",
3
- "version": "9.3.0",
3
+ "version": "9.4.0",
4
4
  "files": [
5
5
  "dist"
6
6
  ],