@lokalise/harmony 1.19.2 → 1.20.1
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.css +1 -1
- package/dist/harmony.mjs +703 -659
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/ProfileMenu.stories.d.ts +28 -0
- package/dist/types/src/features/publicApi/hooks/useAddLanguagesToProjectMutation.d.ts +36 -0
- package/dist/types/src/features/publicApi/languages.d.ts +159 -0
- package/dist/types/src/features/publicApi/node.d.ts +2 -1
- package/dist/types/src/features/publicApi/types/languageTypes.d.ts +108 -0
- package/package.json +1 -1
@@ -0,0 +1,28 @@
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
2
|
+
import { ProfileMenu } from './ProfileMenu';
|
3
|
+
declare const meta: {
|
4
|
+
title: string;
|
5
|
+
component: ({ config, children }: {
|
6
|
+
config: import('./types').SidebarProfileMenuConfig;
|
7
|
+
children: import('./ProfileMenuContent').ProfileMenuContentProps["children"];
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
9
|
+
tags: string[];
|
10
|
+
decorators: ((Story: import('@storybook/core/csf').PartialStoryFn<import('@storybook/react').ReactRenderer, {
|
11
|
+
config: import('./types').SidebarProfileMenuConfig;
|
12
|
+
children: import('./ProfileMenuContent').ProfileMenuContentProps["children"];
|
13
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
14
|
+
parameters: {
|
15
|
+
layout: string;
|
16
|
+
docs: {
|
17
|
+
description: {
|
18
|
+
component: string;
|
19
|
+
};
|
20
|
+
};
|
21
|
+
};
|
22
|
+
};
|
23
|
+
type Story = StoryObj<typeof ProfileMenu>;
|
24
|
+
export declare const PaidPlan: Story;
|
25
|
+
export declare const FreeTrial: Story;
|
26
|
+
export declare const PaidPlanWithFewTeams: Story;
|
27
|
+
export declare const FreePlanWithFewTeams: Story;
|
28
|
+
export default meta;
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { HeaderBuilder } from '../../auth/core/headers/headerBuilder';
|
2
|
+
import { AddLanguagesToProjectPathParams, AddLanguagesToProjectRequestBody, AddLanguagesToProjectResponse } from '../types/languageTypes';
|
3
|
+
import { BaseApiEndpointHeader } from '../types/sharedTypes';
|
4
|
+
import { ApiMutationOverrides } from '../../../utils/types/apiMutationOverrides';
|
5
|
+
import { Wretch } from 'wretch';
|
6
|
+
/**
|
7
|
+
* A react-router wrapper about the addLanguagesToProject public API endpoint
|
8
|
+
*
|
9
|
+
* @param wretchClient - Wretch instance configured to a public API instance.
|
10
|
+
* @param params - URL parameters
|
11
|
+
* @param headers - A header builder instance to resolve the headers for the request.
|
12
|
+
* @param overrides - Additional options to pass to the query.
|
13
|
+
*/
|
14
|
+
export declare function useAddLanguagesToProjectMutation<T>(wretchClient: Wretch<T>, params: AddLanguagesToProjectPathParams, headers: HeaderBuilder<BaseApiEndpointHeader>, overrides?: ApiMutationOverrides<AddLanguagesToProjectResponse, AddLanguagesToProjectRequestBody>): import('@tanstack/react-query').UseMutationResult<{
|
15
|
+
languages: {
|
16
|
+
lang_id: number;
|
17
|
+
lang_iso: string;
|
18
|
+
lang_name: string;
|
19
|
+
is_rtl: boolean;
|
20
|
+
plural_forms: (string | undefined)[];
|
21
|
+
}[];
|
22
|
+
project_id: string;
|
23
|
+
project_uuid: string;
|
24
|
+
errors?: {
|
25
|
+
code: number;
|
26
|
+
message: string;
|
27
|
+
lang_iso: string;
|
28
|
+
}[] | undefined;
|
29
|
+
}, undefined, {
|
30
|
+
languages: {
|
31
|
+
lang_iso: string;
|
32
|
+
custom_iso?: string | undefined;
|
33
|
+
custom_name?: string | undefined;
|
34
|
+
custom_plural_forms?: string[] | undefined;
|
35
|
+
}[];
|
36
|
+
}, undefined>;
|
@@ -103,6 +103,165 @@ export declare const listProjectLanguages: import('@lokalise/universal-ts-utils/
|
|
103
103
|
}, {
|
104
104
|
'X-LOKALISE-PLUGIN': string;
|
105
105
|
}>]>>, false, false>;
|
106
|
+
export declare const addLanguagesToProject: import('@lokalise/universal-ts-utils/node').PayloadRouteDefinition<{
|
107
|
+
projectId: string;
|
108
|
+
}, import('zod').ZodObject<{
|
109
|
+
languages: import('zod').ZodArray<import('zod').ZodObject<{
|
110
|
+
lang_iso: import('zod').ZodString;
|
111
|
+
custom_iso: import('zod').ZodOptional<import('zod').ZodString>;
|
112
|
+
custom_name: import('zod').ZodOptional<import('zod').ZodString>;
|
113
|
+
custom_plural_forms: import('zod').ZodOptional<import('zod').ZodArray<import('zod').ZodString, "many">>;
|
114
|
+
}, "strip", import('zod').ZodTypeAny, {
|
115
|
+
lang_iso: string;
|
116
|
+
custom_iso?: string | undefined;
|
117
|
+
custom_name?: string | undefined;
|
118
|
+
custom_plural_forms?: string[] | undefined;
|
119
|
+
}, {
|
120
|
+
lang_iso: string;
|
121
|
+
custom_iso?: string | undefined;
|
122
|
+
custom_name?: string | undefined;
|
123
|
+
custom_plural_forms?: string[] | undefined;
|
124
|
+
}>, "many">;
|
125
|
+
}, "strip", import('zod').ZodTypeAny, {
|
126
|
+
languages: {
|
127
|
+
lang_iso: string;
|
128
|
+
custom_iso?: string | undefined;
|
129
|
+
custom_name?: string | undefined;
|
130
|
+
custom_plural_forms?: string[] | undefined;
|
131
|
+
}[];
|
132
|
+
}, {
|
133
|
+
languages: {
|
134
|
+
lang_iso: string;
|
135
|
+
custom_iso?: string | undefined;
|
136
|
+
custom_name?: string | undefined;
|
137
|
+
custom_plural_forms?: string[] | undefined;
|
138
|
+
}[];
|
139
|
+
}>, import('zod').ZodObject<{
|
140
|
+
project_id: import('zod').ZodString;
|
141
|
+
project_uuid: import('zod').ZodString;
|
142
|
+
languages: import('zod').ZodArray<import('zod').ZodObject<{
|
143
|
+
lang_id: import('zod').ZodNumber;
|
144
|
+
lang_iso: import('zod').ZodString;
|
145
|
+
lang_name: import('zod').ZodString;
|
146
|
+
is_rtl: import('zod').ZodBoolean;
|
147
|
+
plural_forms: import('zod').ZodArray<import('zod').ZodOptional<import('zod').ZodString>, "many">;
|
148
|
+
}, "strip", import('zod').ZodTypeAny, {
|
149
|
+
lang_id: number;
|
150
|
+
lang_iso: string;
|
151
|
+
lang_name: string;
|
152
|
+
is_rtl: boolean;
|
153
|
+
plural_forms: (string | undefined)[];
|
154
|
+
}, {
|
155
|
+
lang_id: number;
|
156
|
+
lang_iso: string;
|
157
|
+
lang_name: string;
|
158
|
+
is_rtl: boolean;
|
159
|
+
plural_forms: (string | undefined)[];
|
160
|
+
}>, "many">;
|
161
|
+
errors: import('zod').ZodOptional<import('zod').ZodArray<import('zod').ZodObject<{
|
162
|
+
message: import('zod').ZodString;
|
163
|
+
code: import('zod').ZodNumber;
|
164
|
+
lang_iso: import('zod').ZodString;
|
165
|
+
}, "strip", import('zod').ZodTypeAny, {
|
166
|
+
code: number;
|
167
|
+
message: string;
|
168
|
+
lang_iso: string;
|
169
|
+
}, {
|
170
|
+
code: number;
|
171
|
+
message: string;
|
172
|
+
lang_iso: string;
|
173
|
+
}>, "many">>;
|
174
|
+
}, "strip", import('zod').ZodTypeAny, {
|
175
|
+
languages: {
|
176
|
+
lang_id: number;
|
177
|
+
lang_iso: string;
|
178
|
+
lang_name: string;
|
179
|
+
is_rtl: boolean;
|
180
|
+
plural_forms: (string | undefined)[];
|
181
|
+
}[];
|
182
|
+
project_id: string;
|
183
|
+
project_uuid: string;
|
184
|
+
errors?: {
|
185
|
+
code: number;
|
186
|
+
message: string;
|
187
|
+
lang_iso: string;
|
188
|
+
}[] | undefined;
|
189
|
+
}, {
|
190
|
+
languages: {
|
191
|
+
lang_id: number;
|
192
|
+
lang_iso: string;
|
193
|
+
lang_name: string;
|
194
|
+
is_rtl: boolean;
|
195
|
+
plural_forms: (string | undefined)[];
|
196
|
+
}[];
|
197
|
+
project_id: string;
|
198
|
+
project_uuid: string;
|
199
|
+
errors?: {
|
200
|
+
code: number;
|
201
|
+
message: string;
|
202
|
+
lang_iso: string;
|
203
|
+
}[] | undefined;
|
204
|
+
}>, import('zod').ZodObject<{
|
205
|
+
projectId: import('zod').ZodString;
|
206
|
+
}, "strip", import('zod').ZodTypeAny, {
|
207
|
+
projectId: string;
|
208
|
+
}, {
|
209
|
+
projectId: string;
|
210
|
+
}>, undefined, import('zod').ZodIntersection<import('zod').ZodUnion<[import('zod').ZodUnion<[import('zod').ZodObject<{
|
211
|
+
authorization: import('zod').ZodString;
|
212
|
+
}, "strip", import('zod').ZodTypeAny, {
|
213
|
+
authorization: string;
|
214
|
+
}, {
|
215
|
+
authorization: string;
|
216
|
+
}>, import('zod').ZodObject<{
|
217
|
+
AUTHORIZATION: import('zod').ZodString;
|
218
|
+
}, "strip", import('zod').ZodTypeAny, {
|
219
|
+
AUTHORIZATION: string;
|
220
|
+
}, {
|
221
|
+
AUTHORIZATION: string;
|
222
|
+
}>]>, import('zod').ZodUnion<[import('zod').ZodObject<{
|
223
|
+
'X-API-Token': import('zod').ZodString;
|
224
|
+
}, "strip", import('zod').ZodTypeAny, {
|
225
|
+
'X-API-Token': string;
|
226
|
+
}, {
|
227
|
+
'X-API-Token': string;
|
228
|
+
}>, import('zod').ZodObject<{
|
229
|
+
'X-Api-Token': import('zod').ZodString;
|
230
|
+
}, "strip", import('zod').ZodTypeAny, {
|
231
|
+
'X-Api-Token': string;
|
232
|
+
}, {
|
233
|
+
'X-Api-Token': string;
|
234
|
+
}>, import('zod').ZodObject<{
|
235
|
+
'x-api-token': import('zod').ZodString;
|
236
|
+
}, "strip", import('zod').ZodTypeAny, {
|
237
|
+
'x-api-token': string;
|
238
|
+
}, {
|
239
|
+
'x-api-token': string;
|
240
|
+
}>, import('zod').ZodObject<{
|
241
|
+
'X-API-TOKEN': import('zod').ZodString;
|
242
|
+
}, "strip", import('zod').ZodTypeAny, {
|
243
|
+
'X-API-TOKEN': string;
|
244
|
+
}, {
|
245
|
+
'X-API-TOKEN': string;
|
246
|
+
}>]>]>, import('zod').ZodUnion<[import('zod').ZodObject<{
|
247
|
+
'X-Lokalise-Plugin': import('zod').ZodString;
|
248
|
+
}, "strip", import('zod').ZodTypeAny, {
|
249
|
+
'X-Lokalise-Plugin': string;
|
250
|
+
}, {
|
251
|
+
'X-Lokalise-Plugin': string;
|
252
|
+
}>, import('zod').ZodObject<{
|
253
|
+
'x-lokalise-plugin': import('zod').ZodString;
|
254
|
+
}, "strip", import('zod').ZodTypeAny, {
|
255
|
+
'x-lokalise-plugin': string;
|
256
|
+
}, {
|
257
|
+
'x-lokalise-plugin': string;
|
258
|
+
}>, import('zod').ZodObject<{
|
259
|
+
'X-LOKALISE-PLUGIN': import('zod').ZodString;
|
260
|
+
}, "strip", import('zod').ZodTypeAny, {
|
261
|
+
'X-LOKALISE-PLUGIN': string;
|
262
|
+
}, {
|
263
|
+
'X-LOKALISE-PLUGIN': string;
|
264
|
+
}>]>>, false, false>;
|
106
265
|
export declare const bulkUpdateProjectLanguages: import('@lokalise/universal-ts-utils/node').PayloadRouteDefinition<{
|
107
266
|
projectId: string;
|
108
267
|
}, import('zod').ZodObject<{
|
@@ -3,7 +3,7 @@ export * from './languages';
|
|
3
3
|
export * from './projects';
|
4
4
|
export * from './teamUsers';
|
5
5
|
export * from './userToken';
|
6
|
-
export type { BulkUpdateProjectLanguagesRequestBody, BulkUpdateProjectLanguagesResponse, Language, LanguageIso, LanguageStatistics, ListProjectLanguagesResponse, } from './types/languageTypes';
|
6
|
+
export type { BulkUpdateProjectLanguagesRequestBody, BulkUpdateProjectLanguagesResponse, Language, LanguageIso, LanguageStatistics, ListProjectLanguagesResponse, AddLanguagesToProjectPathParams, AddLanguagesToProjectRequestBody, AddLanguagesToProjectResponse, } from './types/languageTypes';
|
7
7
|
export type { CreateProjectRequestBody, ListProjectsRequestQuery, ListProjectsSuccessResponseBody, Project, ProjectApiBaseHeaders, ProjectQaIssues, ProjectSettings, ProjectType, UpdateProjectPathParams, UpdateProjectRequestBody, } from './types/projectTypes';
|
8
8
|
export type { TeamRole } from './types/teamRoleTypes';
|
9
9
|
export type { Contributor, ContributorLanguage } from './types/contributorTypes';
|
@@ -18,3 +18,4 @@ export * from './hooks/useRetrieveContributorQuery';
|
|
18
18
|
export * from './hooks/useRetrieveProjectQuery';
|
19
19
|
export * from './hooks/useUpdateProjectMutation';
|
20
20
|
export * from './hooks/useBulkUpdateProjectLanguagesMutation';
|
21
|
+
export * from './hooks/useAddLanguagesToProjectMutation';
|
@@ -98,6 +98,114 @@ export declare const LIST_PROJECT_LANGUAGES_RESPONSE_SCHEMA: z.ZodObject<{
|
|
98
98
|
project_uuid: string;
|
99
99
|
}>;
|
100
100
|
export type ListProjectLanguagesResponse = z.infer<typeof LIST_PROJECT_LANGUAGES_RESPONSE_SCHEMA>;
|
101
|
+
export declare const ADD_LANGUAGES_TO_PROJECT_PATH_PARAMS_SCHEMA: z.ZodObject<{
|
102
|
+
projectId: z.ZodString;
|
103
|
+
}, "strip", z.ZodTypeAny, {
|
104
|
+
projectId: string;
|
105
|
+
}, {
|
106
|
+
projectId: string;
|
107
|
+
}>;
|
108
|
+
export type AddLanguagesToProjectPathParams = z.infer<typeof ADD_LANGUAGES_TO_PROJECT_PATH_PARAMS_SCHEMA>;
|
109
|
+
export declare const ADD_LANGUAGES_TO_PROJECT_REQUEST_BODY_SCHEMA: z.ZodObject<{
|
110
|
+
languages: z.ZodArray<z.ZodObject<{
|
111
|
+
lang_iso: z.ZodString;
|
112
|
+
custom_iso: z.ZodOptional<z.ZodString>;
|
113
|
+
custom_name: z.ZodOptional<z.ZodString>;
|
114
|
+
custom_plural_forms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
115
|
+
}, "strip", z.ZodTypeAny, {
|
116
|
+
lang_iso: string;
|
117
|
+
custom_iso?: string | undefined;
|
118
|
+
custom_name?: string | undefined;
|
119
|
+
custom_plural_forms?: string[] | undefined;
|
120
|
+
}, {
|
121
|
+
lang_iso: string;
|
122
|
+
custom_iso?: string | undefined;
|
123
|
+
custom_name?: string | undefined;
|
124
|
+
custom_plural_forms?: string[] | undefined;
|
125
|
+
}>, "many">;
|
126
|
+
}, "strip", z.ZodTypeAny, {
|
127
|
+
languages: {
|
128
|
+
lang_iso: string;
|
129
|
+
custom_iso?: string | undefined;
|
130
|
+
custom_name?: string | undefined;
|
131
|
+
custom_plural_forms?: string[] | undefined;
|
132
|
+
}[];
|
133
|
+
}, {
|
134
|
+
languages: {
|
135
|
+
lang_iso: string;
|
136
|
+
custom_iso?: string | undefined;
|
137
|
+
custom_name?: string | undefined;
|
138
|
+
custom_plural_forms?: string[] | undefined;
|
139
|
+
}[];
|
140
|
+
}>;
|
141
|
+
export type AddLanguagesToProjectRequestBody = z.infer<typeof ADD_LANGUAGES_TO_PROJECT_REQUEST_BODY_SCHEMA>;
|
142
|
+
export declare const ADD_LANGUAGES_TO_PROJECT_RESPONSE_SCHEMA: z.ZodObject<{
|
143
|
+
project_id: z.ZodString;
|
144
|
+
project_uuid: z.ZodString;
|
145
|
+
languages: z.ZodArray<z.ZodObject<{
|
146
|
+
lang_id: z.ZodNumber;
|
147
|
+
lang_iso: z.ZodString;
|
148
|
+
lang_name: z.ZodString;
|
149
|
+
is_rtl: z.ZodBoolean;
|
150
|
+
plural_forms: z.ZodArray<z.ZodOptional<z.ZodString>, "many">;
|
151
|
+
}, "strip", z.ZodTypeAny, {
|
152
|
+
lang_id: number;
|
153
|
+
lang_iso: string;
|
154
|
+
lang_name: string;
|
155
|
+
is_rtl: boolean;
|
156
|
+
plural_forms: (string | undefined)[];
|
157
|
+
}, {
|
158
|
+
lang_id: number;
|
159
|
+
lang_iso: string;
|
160
|
+
lang_name: string;
|
161
|
+
is_rtl: boolean;
|
162
|
+
plural_forms: (string | undefined)[];
|
163
|
+
}>, "many">;
|
164
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
165
|
+
message: z.ZodString;
|
166
|
+
code: z.ZodNumber;
|
167
|
+
lang_iso: z.ZodString;
|
168
|
+
}, "strip", z.ZodTypeAny, {
|
169
|
+
code: number;
|
170
|
+
message: string;
|
171
|
+
lang_iso: string;
|
172
|
+
}, {
|
173
|
+
code: number;
|
174
|
+
message: string;
|
175
|
+
lang_iso: string;
|
176
|
+
}>, "many">>;
|
177
|
+
}, "strip", z.ZodTypeAny, {
|
178
|
+
languages: {
|
179
|
+
lang_id: number;
|
180
|
+
lang_iso: string;
|
181
|
+
lang_name: string;
|
182
|
+
is_rtl: boolean;
|
183
|
+
plural_forms: (string | undefined)[];
|
184
|
+
}[];
|
185
|
+
project_id: string;
|
186
|
+
project_uuid: string;
|
187
|
+
errors?: {
|
188
|
+
code: number;
|
189
|
+
message: string;
|
190
|
+
lang_iso: string;
|
191
|
+
}[] | undefined;
|
192
|
+
}, {
|
193
|
+
languages: {
|
194
|
+
lang_id: number;
|
195
|
+
lang_iso: string;
|
196
|
+
lang_name: string;
|
197
|
+
is_rtl: boolean;
|
198
|
+
plural_forms: (string | undefined)[];
|
199
|
+
}[];
|
200
|
+
project_id: string;
|
201
|
+
project_uuid: string;
|
202
|
+
errors?: {
|
203
|
+
code: number;
|
204
|
+
message: string;
|
205
|
+
lang_iso: string;
|
206
|
+
}[] | undefined;
|
207
|
+
}>;
|
208
|
+
export type AddLanguagesToProjectResponse = z.infer<typeof ADD_LANGUAGES_TO_PROJECT_RESPONSE_SCHEMA>;
|
101
209
|
export declare const BULK_UPDATE_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA: z.ZodObject<{
|
102
210
|
projectId: z.ZodString;
|
103
211
|
}, "strip", z.ZodTypeAny, {
|