@lokalise/harmony 1.20.3 → 1.22.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/harmony.cjs +1 -1
- package/dist/harmony.mjs +393 -379
- package/dist/types/src/features/auth/frontend/hooks/useAuthenticatedProjectContributor.d.ts +1 -1
- package/dist/types/src/features/publicApi/contributors.d.ts +70 -10
- package/dist/types/src/features/publicApi/hooks/useAddLanguagesToProjectMutation.d.ts +2 -0
- package/dist/types/src/features/publicApi/hooks/useCreateProjectMutation.d.ts +6 -1
- package/dist/types/src/features/publicApi/hooks/useListProjectLanguagesQuery.d.ts +2 -0
- package/dist/types/src/features/publicApi/hooks/useListProjectsQuery.d.ts +6 -1
- package/dist/types/src/features/publicApi/hooks/useRetrieveContributorQuery.d.ts +16 -3
- package/dist/types/src/features/publicApi/hooks/useRetrieveProjectQuery.d.ts +6 -1
- package/dist/types/src/features/publicApi/hooks/useUpdateProjectMutation.d.ts +6 -1
- package/dist/types/src/features/publicApi/languages.d.ts +20 -0
- package/dist/types/src/features/publicApi/projects.d.ts +112 -10
- package/dist/types/src/features/publicApi/types/contributorTypes.d.ts +93 -8
- package/dist/types/src/features/publicApi/types/languageTypes.d.ts +32 -0
- package/dist/types/src/features/publicApi/types/projectTypes.d.ts +72 -6
- package/package.json +1 -1
@@ -11,7 +11,6 @@ import { Wretch } from 'wretch';
|
|
11
11
|
* @param projectId - The ID of the project to retrieve the contributor information.
|
12
12
|
*/
|
13
13
|
export declare function useAuthenticatedProjectContributor<T>(wretchClient: Wretch<T>, headers: HeaderBuilder<ContributorApiBaseHeader>, projectId: string): import('@tanstack/react-query').UseQueryResult<{
|
14
|
-
project_id: string;
|
15
14
|
contributor: {
|
16
15
|
email: string;
|
17
16
|
user_id: number;
|
@@ -28,4 +27,5 @@ export declare function useAuthenticatedProjectContributor<T>(wretchClient: Wret
|
|
28
27
|
is_admin: boolean;
|
29
28
|
is_reviewer: boolean;
|
30
29
|
};
|
30
|
+
project_id: string;
|
31
31
|
}, undefined>;
|
@@ -2,8 +2,18 @@
|
|
2
2
|
* Public API router definition for retrieving a project contributor
|
3
3
|
*/
|
4
4
|
export declare const retrieveContributor: import('@lokalise/universal-ts-utils/node').GetRouteDefinition<{
|
5
|
-
|
6
|
-
|
5
|
+
project: {
|
6
|
+
uuid: string;
|
7
|
+
} | {
|
8
|
+
id: string;
|
9
|
+
};
|
10
|
+
contributor: {
|
11
|
+
authenticatedUser: true;
|
12
|
+
} | {
|
13
|
+
uuid: string;
|
14
|
+
} | {
|
15
|
+
id: number;
|
16
|
+
};
|
7
17
|
}, import('zod').ZodObject<{
|
8
18
|
project_id: import('zod').ZodString;
|
9
19
|
contributor: import('zod').ZodObject<{
|
@@ -63,7 +73,6 @@ export declare const retrieveContributor: import('@lokalise/universal-ts-utils/n
|
|
63
73
|
is_reviewer: boolean;
|
64
74
|
}>;
|
65
75
|
}, "strip", import('zod').ZodTypeAny, {
|
66
|
-
project_id: string;
|
67
76
|
contributor: {
|
68
77
|
email: string;
|
69
78
|
user_id: number;
|
@@ -80,8 +89,8 @@ export declare const retrieveContributor: import('@lokalise/universal-ts-utils/n
|
|
80
89
|
is_admin: boolean;
|
81
90
|
is_reviewer: boolean;
|
82
91
|
};
|
83
|
-
}, {
|
84
92
|
project_id: string;
|
93
|
+
}, {
|
85
94
|
contributor: {
|
86
95
|
email: string;
|
87
96
|
user_id: number;
|
@@ -98,15 +107,66 @@ export declare const retrieveContributor: import('@lokalise/universal-ts-utils/n
|
|
98
107
|
is_admin: boolean;
|
99
108
|
is_reviewer: boolean;
|
100
109
|
};
|
110
|
+
project_id: string;
|
101
111
|
}>, import('zod').ZodObject<{
|
102
|
-
|
103
|
-
|
112
|
+
project: import('zod').ZodUnion<[import('zod').ZodObject<{
|
113
|
+
uuid: import('zod').ZodString;
|
114
|
+
}, "strip", import('zod').ZodTypeAny, {
|
115
|
+
uuid: string;
|
116
|
+
}, {
|
117
|
+
uuid: string;
|
118
|
+
}>, import('zod').ZodObject<{
|
119
|
+
id: import('zod').ZodString;
|
120
|
+
}, "strip", import('zod').ZodTypeAny, {
|
121
|
+
id: string;
|
122
|
+
}, {
|
123
|
+
id: string;
|
124
|
+
}>]>;
|
125
|
+
contributor: import('zod').ZodUnion<[import('zod').ZodObject<{
|
126
|
+
authenticatedUser: import('zod').ZodLiteral<true>;
|
127
|
+
}, "strip", import('zod').ZodTypeAny, {
|
128
|
+
authenticatedUser: true;
|
129
|
+
}, {
|
130
|
+
authenticatedUser: true;
|
131
|
+
}>, import('zod').ZodObject<{
|
132
|
+
uuid: import('zod').ZodString;
|
133
|
+
}, "strip", import('zod').ZodTypeAny, {
|
134
|
+
uuid: string;
|
135
|
+
}, {
|
136
|
+
uuid: string;
|
137
|
+
}>, import('zod').ZodObject<{
|
138
|
+
id: import('zod').ZodNumber;
|
139
|
+
}, "strip", import('zod').ZodTypeAny, {
|
140
|
+
id: number;
|
141
|
+
}, {
|
142
|
+
id: number;
|
143
|
+
}>]>;
|
104
144
|
}, "strip", import('zod').ZodTypeAny, {
|
105
|
-
|
106
|
-
|
145
|
+
project: {
|
146
|
+
uuid: string;
|
147
|
+
} | {
|
148
|
+
id: string;
|
149
|
+
};
|
150
|
+
contributor: {
|
151
|
+
authenticatedUser: true;
|
152
|
+
} | {
|
153
|
+
uuid: string;
|
154
|
+
} | {
|
155
|
+
id: number;
|
156
|
+
};
|
107
157
|
}, {
|
108
|
-
|
109
|
-
|
158
|
+
project: {
|
159
|
+
uuid: string;
|
160
|
+
} | {
|
161
|
+
id: string;
|
162
|
+
};
|
163
|
+
contributor: {
|
164
|
+
authenticatedUser: true;
|
165
|
+
} | {
|
166
|
+
uuid: string;
|
167
|
+
} | {
|
168
|
+
id: number;
|
169
|
+
};
|
110
170
|
}>, undefined, import('zod').ZodIntersection<import('zod').ZodUnion<[import('zod').ZodUnion<[import('zod').ZodObject<{
|
111
171
|
authorization: import('zod').ZodString;
|
112
172
|
}, "strip", import('zod').ZodTypeAny, {
|
@@ -16,6 +16,8 @@ export declare function useAddLanguagesToProjectMutation<T>(wretchClient: Wretch
|
|
16
16
|
lang_id: number;
|
17
17
|
lang_iso: string;
|
18
18
|
lang_name: string;
|
19
|
+
project_language_id: number;
|
20
|
+
project_language_uuid: string;
|
19
21
|
is_rtl: boolean;
|
20
22
|
plural_forms: (string | undefined)[];
|
21
23
|
}[];
|
@@ -15,13 +15,16 @@ export declare function useCreateProjectMutation<T>(wretchClient: Wretch<T>, hea
|
|
15
15
|
created_at_timestamp: number;
|
16
16
|
team_id: number;
|
17
17
|
description: string;
|
18
|
-
project_id: string;
|
19
18
|
uuid: string;
|
19
|
+
project_id: string;
|
20
20
|
project_type: "localization_files" | "paged_documents" | "marketing";
|
21
21
|
created_by: number;
|
22
22
|
created_by_email: string;
|
23
|
+
team_uuid: string;
|
23
24
|
base_language_id: number;
|
24
25
|
base_language_iso: string;
|
26
|
+
base_project_language_id: number;
|
27
|
+
base_project_language_uuid: string;
|
25
28
|
settings?: {
|
26
29
|
per_platform_key_names: boolean;
|
27
30
|
reviewing: boolean;
|
@@ -41,6 +44,8 @@ export declare function useCreateProjectMutation<T>(wretchClient: Wretch<T>, hea
|
|
41
44
|
language_id: number;
|
42
45
|
language_iso: string;
|
43
46
|
words_to_do: number;
|
47
|
+
project_language_id: number;
|
48
|
+
project_language_uuid: string;
|
44
49
|
}[];
|
45
50
|
progress_total: number;
|
46
51
|
keys_total: number;
|
@@ -18,6 +18,8 @@ export declare function useListProjectLanguagesQuery<T>(wretchClient: Wretch<T>,
|
|
18
18
|
lang_id: number;
|
19
19
|
lang_iso: string;
|
20
20
|
lang_name: string;
|
21
|
+
project_language_id: number;
|
22
|
+
project_language_uuid: string;
|
21
23
|
is_rtl: boolean;
|
22
24
|
plural_forms: (string | undefined)[];
|
23
25
|
}[];
|
@@ -30,13 +30,16 @@ export declare function useListProjectsQuery<T>(wretchClient: Wretch<T>, headers
|
|
30
30
|
created_at_timestamp: number;
|
31
31
|
team_id: number;
|
32
32
|
description: string;
|
33
|
-
project_id: string;
|
34
33
|
uuid: string;
|
34
|
+
project_id: string;
|
35
35
|
project_type: "localization_files" | "paged_documents" | "marketing";
|
36
36
|
created_by: number;
|
37
37
|
created_by_email: string;
|
38
|
+
team_uuid: string;
|
38
39
|
base_language_id: number;
|
39
40
|
base_language_iso: string;
|
41
|
+
base_project_language_id: number;
|
42
|
+
base_project_language_uuid: string;
|
40
43
|
settings?: {
|
41
44
|
per_platform_key_names: boolean;
|
42
45
|
reviewing: boolean;
|
@@ -56,6 +59,8 @@ export declare function useListProjectsQuery<T>(wretchClient: Wretch<T>, headers
|
|
56
59
|
language_id: number;
|
57
60
|
language_iso: string;
|
58
61
|
words_to_do: number;
|
62
|
+
project_language_id: number;
|
63
|
+
project_language_uuid: string;
|
59
64
|
}[];
|
60
65
|
progress_total: number;
|
61
66
|
keys_total: number;
|
@@ -1,12 +1,25 @@
|
|
1
1
|
import { HeaderBuilder } from '../../auth/core/headers/headerBuilder';
|
2
|
-
import { ContributorApiBaseHeader, RetrieveContributorResponse } from '../types/contributorTypes';
|
2
|
+
import { ContributorApiBaseHeader, RetrieveContributorPathParams, RetrieveContributorResponse } from '../types/contributorTypes';
|
3
3
|
import { ApiQueryOverrides } from '../../../utils/types/apiQueryOverrides';
|
4
4
|
import { Wretch } from 'wretch';
|
5
5
|
/**
|
6
6
|
* Factory for creating keys for the useRetrieveContributorQuery hook
|
7
7
|
*/
|
8
8
|
export declare const retrieveContributorKeys: {
|
9
|
-
projectUserKey: (
|
9
|
+
projectUserKey: (params: RetrieveContributorPathParams) => readonly ["RetrieveContributor", {
|
10
|
+
project: {
|
11
|
+
uuid: string;
|
12
|
+
} | {
|
13
|
+
id: string;
|
14
|
+
};
|
15
|
+
contributor: {
|
16
|
+
authenticatedUser: true;
|
17
|
+
} | {
|
18
|
+
uuid: string;
|
19
|
+
} | {
|
20
|
+
id: number;
|
21
|
+
};
|
22
|
+
}];
|
10
23
|
};
|
11
24
|
/**
|
12
25
|
* A react-router wrapper about the retrieveContributor public API endpoint
|
@@ -16,7 +29,6 @@ export declare const retrieveContributorKeys: {
|
|
16
29
|
* @param overrides - Additional options to pass to the query.
|
17
30
|
*/
|
18
31
|
export declare const useRetrieveContributorQuery: <T>(wretchClient: Wretch<T>, headers: HeaderBuilder<ContributorApiBaseHeader>, overrides: ApiQueryOverrides<RetrieveContributorResponse, typeof retrieveContributorKeys>) => import('@tanstack/react-query').UseQueryResult<{
|
19
|
-
project_id: string;
|
20
32
|
contributor: {
|
21
33
|
email: string;
|
22
34
|
user_id: number;
|
@@ -33,4 +45,5 @@ export declare const useRetrieveContributorQuery: <T>(wretchClient: Wretch<T>, h
|
|
33
45
|
is_admin: boolean;
|
34
46
|
is_reviewer: boolean;
|
35
47
|
};
|
48
|
+
project_id: string;
|
36
49
|
}, undefined>;
|
@@ -21,13 +21,16 @@ export declare function useRetrieveProjectQuery<T>(wretchClient: Wretch<T>, head
|
|
21
21
|
created_at_timestamp: number;
|
22
22
|
team_id: number;
|
23
23
|
description: string;
|
24
|
-
project_id: string;
|
25
24
|
uuid: string;
|
25
|
+
project_id: string;
|
26
26
|
project_type: "localization_files" | "paged_documents" | "marketing";
|
27
27
|
created_by: number;
|
28
28
|
created_by_email: string;
|
29
|
+
team_uuid: string;
|
29
30
|
base_language_id: number;
|
30
31
|
base_language_iso: string;
|
32
|
+
base_project_language_id: number;
|
33
|
+
base_project_language_uuid: string;
|
31
34
|
settings?: {
|
32
35
|
per_platform_key_names: boolean;
|
33
36
|
reviewing: boolean;
|
@@ -47,6 +50,8 @@ export declare function useRetrieveProjectQuery<T>(wretchClient: Wretch<T>, head
|
|
47
50
|
language_id: number;
|
48
51
|
language_iso: string;
|
49
52
|
words_to_do: number;
|
53
|
+
project_language_id: number;
|
54
|
+
project_language_uuid: string;
|
50
55
|
}[];
|
51
56
|
progress_total: number;
|
52
57
|
keys_total: number;
|
@@ -16,13 +16,16 @@ export declare function useUpdateProjectMutation<T>(wretchClient: Wretch<T>, hea
|
|
16
16
|
created_at_timestamp: number;
|
17
17
|
team_id: number;
|
18
18
|
description: string;
|
19
|
-
project_id: string;
|
20
19
|
uuid: string;
|
20
|
+
project_id: string;
|
21
21
|
project_type: "localization_files" | "paged_documents" | "marketing";
|
22
22
|
created_by: number;
|
23
23
|
created_by_email: string;
|
24
|
+
team_uuid: string;
|
24
25
|
base_language_id: number;
|
25
26
|
base_language_iso: string;
|
27
|
+
base_project_language_id: number;
|
28
|
+
base_project_language_uuid: string;
|
26
29
|
settings?: {
|
27
30
|
per_platform_key_names: boolean;
|
28
31
|
reviewing: boolean;
|
@@ -42,6 +45,8 @@ export declare function useUpdateProjectMutation<T>(wretchClient: Wretch<T>, hea
|
|
42
45
|
language_id: number;
|
43
46
|
language_iso: string;
|
44
47
|
words_to_do: number;
|
48
|
+
project_language_id: number;
|
49
|
+
project_language_uuid: string;
|
45
50
|
}[];
|
46
51
|
progress_total: number;
|
47
52
|
keys_total: number;
|
@@ -9,16 +9,22 @@ export declare const listProjectLanguages: import('@lokalise/universal-ts-utils/
|
|
9
9
|
lang_name: import('zod').ZodString;
|
10
10
|
is_rtl: import('zod').ZodBoolean;
|
11
11
|
plural_forms: import('zod').ZodArray<import('zod').ZodOptional<import('zod').ZodString>, "many">;
|
12
|
+
project_language_id: import('zod').ZodNumber;
|
13
|
+
project_language_uuid: import('zod').ZodString;
|
12
14
|
}, "strip", import('zod').ZodTypeAny, {
|
13
15
|
lang_id: number;
|
14
16
|
lang_iso: string;
|
15
17
|
lang_name: string;
|
18
|
+
project_language_id: number;
|
19
|
+
project_language_uuid: string;
|
16
20
|
is_rtl: boolean;
|
17
21
|
plural_forms: (string | undefined)[];
|
18
22
|
}, {
|
19
23
|
lang_id: number;
|
20
24
|
lang_iso: string;
|
21
25
|
lang_name: string;
|
26
|
+
project_language_id: number;
|
27
|
+
project_language_uuid: string;
|
22
28
|
is_rtl: boolean;
|
23
29
|
plural_forms: (string | undefined)[];
|
24
30
|
}>, "many">;
|
@@ -27,6 +33,8 @@ export declare const listProjectLanguages: import('@lokalise/universal-ts-utils/
|
|
27
33
|
lang_id: number;
|
28
34
|
lang_iso: string;
|
29
35
|
lang_name: string;
|
36
|
+
project_language_id: number;
|
37
|
+
project_language_uuid: string;
|
30
38
|
is_rtl: boolean;
|
31
39
|
plural_forms: (string | undefined)[];
|
32
40
|
}[];
|
@@ -37,6 +45,8 @@ export declare const listProjectLanguages: import('@lokalise/universal-ts-utils/
|
|
37
45
|
lang_id: number;
|
38
46
|
lang_iso: string;
|
39
47
|
lang_name: string;
|
48
|
+
project_language_id: number;
|
49
|
+
project_language_uuid: string;
|
40
50
|
is_rtl: boolean;
|
41
51
|
plural_forms: (string | undefined)[];
|
42
52
|
}[];
|
@@ -145,16 +155,22 @@ export declare const addLanguagesToProject: import('@lokalise/universal-ts-utils
|
|
145
155
|
lang_name: import('zod').ZodString;
|
146
156
|
is_rtl: import('zod').ZodBoolean;
|
147
157
|
plural_forms: import('zod').ZodArray<import('zod').ZodOptional<import('zod').ZodString>, "many">;
|
158
|
+
project_language_id: import('zod').ZodNumber;
|
159
|
+
project_language_uuid: import('zod').ZodString;
|
148
160
|
}, "strip", import('zod').ZodTypeAny, {
|
149
161
|
lang_id: number;
|
150
162
|
lang_iso: string;
|
151
163
|
lang_name: string;
|
164
|
+
project_language_id: number;
|
165
|
+
project_language_uuid: string;
|
152
166
|
is_rtl: boolean;
|
153
167
|
plural_forms: (string | undefined)[];
|
154
168
|
}, {
|
155
169
|
lang_id: number;
|
156
170
|
lang_iso: string;
|
157
171
|
lang_name: string;
|
172
|
+
project_language_id: number;
|
173
|
+
project_language_uuid: string;
|
158
174
|
is_rtl: boolean;
|
159
175
|
plural_forms: (string | undefined)[];
|
160
176
|
}>, "many">;
|
@@ -176,6 +192,8 @@ export declare const addLanguagesToProject: import('@lokalise/universal-ts-utils
|
|
176
192
|
lang_id: number;
|
177
193
|
lang_iso: string;
|
178
194
|
lang_name: string;
|
195
|
+
project_language_id: number;
|
196
|
+
project_language_uuid: string;
|
179
197
|
is_rtl: boolean;
|
180
198
|
plural_forms: (string | undefined)[];
|
181
199
|
}[];
|
@@ -191,6 +209,8 @@ export declare const addLanguagesToProject: import('@lokalise/universal-ts-utils
|
|
191
209
|
lang_id: number;
|
192
210
|
lang_iso: string;
|
193
211
|
lang_name: string;
|
212
|
+
project_language_id: number;
|
213
|
+
project_language_uuid: string;
|
194
214
|
is_rtl: boolean;
|
195
215
|
plural_forms: (string | undefined)[];
|
196
216
|
}[];
|