@lokalise/harmony 1.11.2 → 1.12.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,16 @@
1
+ import { ListProjectLanguagesResponse } from '../types/languageTypes';
2
+ import { ApiQueryOverrides } from '../../../utils/types/apiQueryOverrides';
3
+ import { Wretch } from 'wretch/types';
4
+ export declare const listProjectLanguagesKey: {
5
+ projectIdKey: (projectId: string) => readonly ["listProjectLanguages", string];
6
+ };
7
+ export declare function useListProjectLanguagesQuery<T>(wretchClient: Wretch<T>, overrides: ApiQueryOverrides<ListProjectLanguagesResponse, typeof listProjectLanguagesKey>): import('@tanstack/react-query').UseQueryResult<{
8
+ languages: {
9
+ lang_id: number;
10
+ lang_iso: string;
11
+ lang_name: string;
12
+ is_rtl: boolean;
13
+ plural_forms: (string | undefined)[];
14
+ }[];
15
+ projectId: string;
16
+ }, undefined>;
@@ -0,0 +1,48 @@
1
+ export declare const listProjectLanguages: import('@lokalise/universal-ts-utils/node').GetRouteDefinition<{
2
+ projectId: string;
3
+ }, import('zod').ZodObject<{
4
+ projectId: import('zod').ZodString;
5
+ languages: import('zod').ZodArray<import('zod').ZodObject<{
6
+ lang_id: import('zod').ZodNumber;
7
+ lang_iso: import('zod').ZodString;
8
+ lang_name: import('zod').ZodString;
9
+ is_rtl: import('zod').ZodBoolean;
10
+ plural_forms: import('zod').ZodArray<import('zod').ZodOptional<import('zod').ZodString>, "many">;
11
+ }, "strip", import('zod').ZodTypeAny, {
12
+ lang_id: number;
13
+ lang_iso: string;
14
+ lang_name: string;
15
+ is_rtl: boolean;
16
+ plural_forms: (string | undefined)[];
17
+ }, {
18
+ lang_id: number;
19
+ lang_iso: string;
20
+ lang_name: string;
21
+ is_rtl: boolean;
22
+ plural_forms: (string | undefined)[];
23
+ }>, "many">;
24
+ }, "strip", import('zod').ZodTypeAny, {
25
+ languages: {
26
+ lang_id: number;
27
+ lang_iso: string;
28
+ lang_name: string;
29
+ is_rtl: boolean;
30
+ plural_forms: (string | undefined)[];
31
+ }[];
32
+ projectId: string;
33
+ }, {
34
+ languages: {
35
+ lang_id: number;
36
+ lang_iso: string;
37
+ lang_name: string;
38
+ is_rtl: boolean;
39
+ plural_forms: (string | undefined)[];
40
+ }[];
41
+ projectId: string;
42
+ }>, import('zod').ZodObject<{
43
+ projectId: import('zod').ZodString;
44
+ }, "strip", import('zod').ZodTypeAny, {
45
+ projectId: string;
46
+ }, {
47
+ projectId: string;
48
+ }>, undefined, undefined, false, false>;
@@ -2,7 +2,7 @@ export * from './contributors';
2
2
  export * from './projects';
3
3
  export * from './teamUsers';
4
4
  export * from './userToken';
5
- export type { LanguageStatistics, LanguageIso } from './types/languageTypes';
5
+ export type { LanguageStatistics, LanguageIso, Language, ListProjectLanguagesResponse, } from './types/languageTypes';
6
6
  export type { Project, ProjectQaIssues, ProjectType, ProjectSettings } from './types/projectTypes';
7
7
  export type { TeamRole } from './types/teamRoleTypes';
8
8
  export type { Contributor, ContributorLanguage } from './types/contributorTypes';
@@ -11,6 +11,7 @@ export type { AuthenticatedRequestHeader, JwtToken } from './types/userTokenType
11
11
  export * from './hooks/useCreateProjectMutation';
12
12
  export * from './hooks/useGetTeamUsersQuery';
13
13
  export * from './hooks/useGetUserTokenQuery';
14
+ export * from './hooks/useListProjectLanguagesQuery';
14
15
  export * from './hooks/useListProjectsQuery';
15
16
  export * from './hooks/useRetrieveContributorQuery';
16
17
  export * from './hooks/useRetrieveProjectQuery';
@@ -27,3 +27,71 @@ export declare const LANGUAGE_STATISTICS_SCHEMA: z.ZodObject<{
27
27
  words_to_do: number;
28
28
  }>;
29
29
  export type LanguageStatistics = z.infer<typeof LANGUAGE_STATISTICS_SCHEMA>;
30
+ export declare const LIST_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA: z.ZodObject<{
31
+ projectId: z.ZodString;
32
+ }, "strip", z.ZodTypeAny, {
33
+ projectId: string;
34
+ }, {
35
+ projectId: string;
36
+ }>;
37
+ export declare const LANGUAGE_SCHEMA: z.ZodObject<{
38
+ lang_id: z.ZodNumber;
39
+ lang_iso: z.ZodString;
40
+ lang_name: z.ZodString;
41
+ is_rtl: z.ZodBoolean;
42
+ plural_forms: z.ZodArray<z.ZodOptional<z.ZodString>, "many">;
43
+ }, "strip", z.ZodTypeAny, {
44
+ lang_id: number;
45
+ lang_iso: string;
46
+ lang_name: string;
47
+ is_rtl: boolean;
48
+ plural_forms: (string | undefined)[];
49
+ }, {
50
+ lang_id: number;
51
+ lang_iso: string;
52
+ lang_name: string;
53
+ is_rtl: boolean;
54
+ plural_forms: (string | undefined)[];
55
+ }>;
56
+ export type Language = z.infer<typeof LANGUAGE_SCHEMA>;
57
+ export declare const LIST_PROJECT_LANGUAGES_RESPONSE_SCHEMA: z.ZodObject<{
58
+ projectId: z.ZodString;
59
+ languages: z.ZodArray<z.ZodObject<{
60
+ lang_id: z.ZodNumber;
61
+ lang_iso: z.ZodString;
62
+ lang_name: z.ZodString;
63
+ is_rtl: z.ZodBoolean;
64
+ plural_forms: z.ZodArray<z.ZodOptional<z.ZodString>, "many">;
65
+ }, "strip", z.ZodTypeAny, {
66
+ lang_id: number;
67
+ lang_iso: string;
68
+ lang_name: string;
69
+ is_rtl: boolean;
70
+ plural_forms: (string | undefined)[];
71
+ }, {
72
+ lang_id: number;
73
+ lang_iso: string;
74
+ lang_name: string;
75
+ is_rtl: boolean;
76
+ plural_forms: (string | undefined)[];
77
+ }>, "many">;
78
+ }, "strip", z.ZodTypeAny, {
79
+ languages: {
80
+ lang_id: number;
81
+ lang_iso: string;
82
+ lang_name: string;
83
+ is_rtl: boolean;
84
+ plural_forms: (string | undefined)[];
85
+ }[];
86
+ projectId: string;
87
+ }, {
88
+ languages: {
89
+ lang_id: number;
90
+ lang_iso: string;
91
+ lang_name: string;
92
+ is_rtl: boolean;
93
+ plural_forms: (string | undefined)[];
94
+ }[];
95
+ projectId: string;
96
+ }>;
97
+ export type ListProjectLanguagesResponse = z.infer<typeof LIST_PROJECT_LANGUAGES_RESPONSE_SCHEMA>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokalise/harmony",
3
- "version": "1.11.2",
3
+ "version": "1.12.0",
4
4
  "author": {
5
5
  "name": "Lokalise",
6
6
  "url": "https://lokalise.com/"