@lokalise/harmony 1.20.2 → 1.20.3
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 +268 -260
- package/dist/types/src/features/auth/frontend/hooks/useAuthenticatedProjectContributor.d.ts +3 -3
- package/dist/types/src/features/publicApi/contributors.d.ts +57 -58
- package/dist/types/src/features/publicApi/hooks/useRetrieveContributorQuery.d.ts +5 -5
- package/dist/types/src/features/publicApi/teamUsers.d.ts +42 -43
- package/dist/types/src/features/publicApi/types/contributorTypes.d.ts +21 -10
- package/dist/types/src/features/publicApi/types/teamUserTypes.d.ts +11 -0
- package/package.json +1 -1
@@ -11,7 +11,8 @@ 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
|
-
|
14
|
+
project_id: string;
|
15
|
+
contributor: {
|
15
16
|
email: string;
|
16
17
|
user_id: number;
|
17
18
|
fullname: string;
|
@@ -26,6 +27,5 @@ export declare function useAuthenticatedProjectContributor<T>(wretchClient: Wret
|
|
26
27
|
}[];
|
27
28
|
is_admin: boolean;
|
28
29
|
is_reviewer: boolean;
|
29
|
-
}
|
30
|
-
project_id: string;
|
30
|
+
};
|
31
31
|
}, undefined>;
|
@@ -1,25 +1,24 @@
|
|
1
|
-
import { z } from 'zod';
|
2
1
|
/**
|
3
2
|
* Public API router definition for retrieving a project contributor
|
4
3
|
*/
|
5
4
|
export declare const retrieveContributor: import('@lokalise/universal-ts-utils/node').GetRouteDefinition<{
|
6
5
|
projectId: string;
|
7
6
|
contributorId: number;
|
8
|
-
},
|
9
|
-
project_id:
|
10
|
-
|
11
|
-
user_id:
|
12
|
-
email:
|
13
|
-
fullname:
|
14
|
-
created_at:
|
15
|
-
created_at_timestamp:
|
16
|
-
admin_rights:
|
17
|
-
languages:
|
18
|
-
lang_id:
|
19
|
-
lang_iso:
|
20
|
-
lang_name:
|
21
|
-
is_writable:
|
22
|
-
}, "strip",
|
7
|
+
}, import('zod').ZodObject<{
|
8
|
+
project_id: import('zod').ZodString;
|
9
|
+
contributor: import('zod').ZodObject<{
|
10
|
+
user_id: import('zod').ZodNumber;
|
11
|
+
email: import('zod').ZodString;
|
12
|
+
fullname: import('zod').ZodString;
|
13
|
+
created_at: import('zod').ZodString;
|
14
|
+
created_at_timestamp: import('zod').ZodNumber;
|
15
|
+
admin_rights: import('zod').ZodArray<import('zod').ZodString, "many">;
|
16
|
+
languages: import('zod').ZodArray<import('zod').ZodObject<{
|
17
|
+
lang_id: import('zod').ZodNumber;
|
18
|
+
lang_iso: import('zod').ZodString;
|
19
|
+
lang_name: import('zod').ZodString;
|
20
|
+
is_writable: import('zod').ZodUnion<[import('zod').ZodLiteral<0>, import('zod').ZodLiteral<1>]>;
|
21
|
+
}, "strip", import('zod').ZodTypeAny, {
|
23
22
|
lang_id: number;
|
24
23
|
lang_iso: string;
|
25
24
|
lang_name: string;
|
@@ -30,9 +29,9 @@ export declare const retrieveContributor: import('@lokalise/universal-ts-utils/n
|
|
30
29
|
lang_name: string;
|
31
30
|
is_writable: 0 | 1;
|
32
31
|
}>, "many">;
|
33
|
-
is_admin:
|
34
|
-
is_reviewer:
|
35
|
-
}, "strip",
|
32
|
+
is_admin: import('zod').ZodBoolean;
|
33
|
+
is_reviewer: import('zod').ZodBoolean;
|
34
|
+
}, "strip", import('zod').ZodTypeAny, {
|
36
35
|
email: string;
|
37
36
|
user_id: number;
|
38
37
|
fullname: string;
|
@@ -62,9 +61,10 @@ export declare const retrieveContributor: import('@lokalise/universal-ts-utils/n
|
|
62
61
|
}[];
|
63
62
|
is_admin: boolean;
|
64
63
|
is_reviewer: boolean;
|
65
|
-
}
|
66
|
-
}, "strip",
|
67
|
-
|
64
|
+
}>;
|
65
|
+
}, "strip", import('zod').ZodTypeAny, {
|
66
|
+
project_id: string;
|
67
|
+
contributor: {
|
68
68
|
email: string;
|
69
69
|
user_id: number;
|
70
70
|
fullname: string;
|
@@ -79,10 +79,10 @@ export declare const retrieveContributor: import('@lokalise/universal-ts-utils/n
|
|
79
79
|
}[];
|
80
80
|
is_admin: boolean;
|
81
81
|
is_reviewer: boolean;
|
82
|
-
}
|
83
|
-
project_id: string;
|
82
|
+
};
|
84
83
|
}, {
|
85
|
-
|
84
|
+
project_id: string;
|
85
|
+
contributor: {
|
86
86
|
email: string;
|
87
87
|
user_id: number;
|
88
88
|
fullname: string;
|
@@ -97,68 +97,67 @@ export declare const retrieveContributor: import('@lokalise/universal-ts-utils/n
|
|
97
97
|
}[];
|
98
98
|
is_admin: boolean;
|
99
99
|
is_reviewer: boolean;
|
100
|
-
}
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
}, "strip", z.ZodTypeAny, {
|
100
|
+
};
|
101
|
+
}>, import('zod').ZodObject<{
|
102
|
+
projectId: import('zod').ZodString;
|
103
|
+
contributorId: import('zod').ZodNumber;
|
104
|
+
}, "strip", import('zod').ZodTypeAny, {
|
106
105
|
projectId: string;
|
107
106
|
contributorId: number;
|
108
107
|
}, {
|
109
108
|
projectId: string;
|
110
109
|
contributorId: number;
|
111
|
-
}>, undefined,
|
112
|
-
authorization:
|
113
|
-
}, "strip",
|
110
|
+
}>, undefined, import('zod').ZodIntersection<import('zod').ZodUnion<[import('zod').ZodUnion<[import('zod').ZodObject<{
|
111
|
+
authorization: import('zod').ZodString;
|
112
|
+
}, "strip", import('zod').ZodTypeAny, {
|
114
113
|
authorization: string;
|
115
114
|
}, {
|
116
115
|
authorization: string;
|
117
|
-
}>,
|
118
|
-
AUTHORIZATION:
|
119
|
-
}, "strip",
|
116
|
+
}>, import('zod').ZodObject<{
|
117
|
+
AUTHORIZATION: import('zod').ZodString;
|
118
|
+
}, "strip", import('zod').ZodTypeAny, {
|
120
119
|
AUTHORIZATION: string;
|
121
120
|
}, {
|
122
121
|
AUTHORIZATION: string;
|
123
|
-
}>]>,
|
124
|
-
'X-API-Token':
|
125
|
-
}, "strip",
|
122
|
+
}>]>, import('zod').ZodUnion<[import('zod').ZodObject<{
|
123
|
+
'X-API-Token': import('zod').ZodString;
|
124
|
+
}, "strip", import('zod').ZodTypeAny, {
|
126
125
|
'X-API-Token': string;
|
127
126
|
}, {
|
128
127
|
'X-API-Token': string;
|
129
|
-
}>,
|
130
|
-
'X-Api-Token':
|
131
|
-
}, "strip",
|
128
|
+
}>, import('zod').ZodObject<{
|
129
|
+
'X-Api-Token': import('zod').ZodString;
|
130
|
+
}, "strip", import('zod').ZodTypeAny, {
|
132
131
|
'X-Api-Token': string;
|
133
132
|
}, {
|
134
133
|
'X-Api-Token': string;
|
135
|
-
}>,
|
136
|
-
'x-api-token':
|
137
|
-
}, "strip",
|
134
|
+
}>, import('zod').ZodObject<{
|
135
|
+
'x-api-token': import('zod').ZodString;
|
136
|
+
}, "strip", import('zod').ZodTypeAny, {
|
138
137
|
'x-api-token': string;
|
139
138
|
}, {
|
140
139
|
'x-api-token': string;
|
141
|
-
}>,
|
142
|
-
'X-API-TOKEN':
|
143
|
-
}, "strip",
|
140
|
+
}>, import('zod').ZodObject<{
|
141
|
+
'X-API-TOKEN': import('zod').ZodString;
|
142
|
+
}, "strip", import('zod').ZodTypeAny, {
|
144
143
|
'X-API-TOKEN': string;
|
145
144
|
}, {
|
146
145
|
'X-API-TOKEN': string;
|
147
|
-
}>]>]>,
|
148
|
-
'X-Lokalise-Plugin':
|
149
|
-
}, "strip",
|
146
|
+
}>]>]>, import('zod').ZodUnion<[import('zod').ZodObject<{
|
147
|
+
'X-Lokalise-Plugin': import('zod').ZodString;
|
148
|
+
}, "strip", import('zod').ZodTypeAny, {
|
150
149
|
'X-Lokalise-Plugin': string;
|
151
150
|
}, {
|
152
151
|
'X-Lokalise-Plugin': string;
|
153
|
-
}>,
|
154
|
-
'x-lokalise-plugin':
|
155
|
-
}, "strip",
|
152
|
+
}>, import('zod').ZodObject<{
|
153
|
+
'x-lokalise-plugin': import('zod').ZodString;
|
154
|
+
}, "strip", import('zod').ZodTypeAny, {
|
156
155
|
'x-lokalise-plugin': string;
|
157
156
|
}, {
|
158
157
|
'x-lokalise-plugin': string;
|
159
|
-
}>,
|
160
|
-
'X-LOKALISE-PLUGIN':
|
161
|
-
}, "strip",
|
158
|
+
}>, import('zod').ZodObject<{
|
159
|
+
'X-LOKALISE-PLUGIN': import('zod').ZodString;
|
160
|
+
}, "strip", import('zod').ZodTypeAny, {
|
162
161
|
'X-LOKALISE-PLUGIN': string;
|
163
162
|
}, {
|
164
163
|
'X-LOKALISE-PLUGIN': string;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { HeaderBuilder } from '../../auth/core/headers/headerBuilder';
|
2
|
-
import { ContributorApiBaseHeader,
|
2
|
+
import { ContributorApiBaseHeader, RetrieveContributorResponse } from '../types/contributorTypes';
|
3
3
|
import { ApiQueryOverrides } from '../../../utils/types/apiQueryOverrides';
|
4
4
|
import { Wretch } from 'wretch';
|
5
5
|
/**
|
@@ -15,8 +15,9 @@ export declare const retrieveContributorKeys: {
|
|
15
15
|
* @param headers - A header builder instance to resolve headers for the request.
|
16
16
|
* @param overrides - Additional options to pass to the query.
|
17
17
|
*/
|
18
|
-
export declare const useRetrieveContributorQuery: <T>(wretchClient: Wretch<T>, headers: HeaderBuilder<ContributorApiBaseHeader>, overrides: ApiQueryOverrides<
|
19
|
-
|
18
|
+
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
|
+
contributor: {
|
20
21
|
email: string;
|
21
22
|
user_id: number;
|
22
23
|
fullname: string;
|
@@ -31,6 +32,5 @@ export declare const useRetrieveContributorQuery: <T>(wretchClient: Wretch<T>, h
|
|
31
32
|
}[];
|
32
33
|
is_admin: boolean;
|
33
34
|
is_reviewer: boolean;
|
34
|
-
}
|
35
|
-
project_id: string;
|
35
|
+
};
|
36
36
|
}, undefined>;
|
@@ -1,20 +1,19 @@
|
|
1
|
-
import { z } from 'zod';
|
2
1
|
/**
|
3
2
|
* Public API router definition for getting the details of a team user
|
4
3
|
*/
|
5
4
|
export declare const getTeamUser: import('@lokalise/universal-ts-utils/node').GetRouteDefinition<{
|
6
5
|
userId: number;
|
7
6
|
teamId: number;
|
8
|
-
},
|
9
|
-
team_id:
|
10
|
-
team_user:
|
11
|
-
user_id:
|
12
|
-
email:
|
13
|
-
fullname:
|
14
|
-
created_at:
|
15
|
-
created_at_timestamp:
|
16
|
-
role:
|
17
|
-
}, "strip",
|
7
|
+
}, import('zod').ZodObject<{
|
8
|
+
team_id: import('zod').ZodNumber;
|
9
|
+
team_user: import('zod').ZodObject<{
|
10
|
+
user_id: import('zod').ZodNumber;
|
11
|
+
email: import('zod').ZodString;
|
12
|
+
fullname: import('zod').ZodString;
|
13
|
+
created_at: import('zod').ZodString;
|
14
|
+
created_at_timestamp: import('zod').ZodNumber;
|
15
|
+
role: import('zod').ZodUnion<[import('zod').ZodLiteral<"owner">, import('zod').ZodLiteral<"admin">, import('zod').ZodLiteral<"biller">, import('zod').ZodLiteral<"member">]>;
|
16
|
+
}, "strip", import('zod').ZodTypeAny, {
|
18
17
|
role: "member" | "admin" | "biller" | "owner";
|
19
18
|
email: string;
|
20
19
|
user_id: number;
|
@@ -29,7 +28,7 @@ export declare const getTeamUser: import('@lokalise/universal-ts-utils/node').Ge
|
|
29
28
|
created_at: string;
|
30
29
|
created_at_timestamp: number;
|
31
30
|
}>;
|
32
|
-
}, "strip",
|
31
|
+
}, "strip", import('zod').ZodTypeAny, {
|
33
32
|
team_id: number;
|
34
33
|
team_user: {
|
35
34
|
role: "member" | "admin" | "biller" | "owner";
|
@@ -49,66 +48,66 @@ export declare const getTeamUser: import('@lokalise/universal-ts-utils/node').Ge
|
|
49
48
|
created_at: string;
|
50
49
|
created_at_timestamp: number;
|
51
50
|
};
|
52
|
-
}>,
|
53
|
-
teamId:
|
54
|
-
userId:
|
55
|
-
}, "strip",
|
51
|
+
}>, import('zod').ZodObject<{
|
52
|
+
teamId: import('zod').ZodNumber;
|
53
|
+
userId: import('zod').ZodNumber;
|
54
|
+
}, "strip", import('zod').ZodTypeAny, {
|
56
55
|
userId: number;
|
57
56
|
teamId: number;
|
58
57
|
}, {
|
59
58
|
userId: number;
|
60
59
|
teamId: number;
|
61
|
-
}>, undefined,
|
62
|
-
authorization:
|
63
|
-
}, "strip",
|
60
|
+
}>, undefined, import('zod').ZodIntersection<import('zod').ZodUnion<[import('zod').ZodUnion<[import('zod').ZodObject<{
|
61
|
+
authorization: import('zod').ZodString;
|
62
|
+
}, "strip", import('zod').ZodTypeAny, {
|
64
63
|
authorization: string;
|
65
64
|
}, {
|
66
65
|
authorization: string;
|
67
|
-
}>,
|
68
|
-
AUTHORIZATION:
|
69
|
-
}, "strip",
|
66
|
+
}>, import('zod').ZodObject<{
|
67
|
+
AUTHORIZATION: import('zod').ZodString;
|
68
|
+
}, "strip", import('zod').ZodTypeAny, {
|
70
69
|
AUTHORIZATION: string;
|
71
70
|
}, {
|
72
71
|
AUTHORIZATION: string;
|
73
|
-
}>]>,
|
74
|
-
'X-API-Token':
|
75
|
-
}, "strip",
|
72
|
+
}>]>, import('zod').ZodUnion<[import('zod').ZodObject<{
|
73
|
+
'X-API-Token': import('zod').ZodString;
|
74
|
+
}, "strip", import('zod').ZodTypeAny, {
|
76
75
|
'X-API-Token': string;
|
77
76
|
}, {
|
78
77
|
'X-API-Token': string;
|
79
|
-
}>,
|
80
|
-
'X-Api-Token':
|
81
|
-
}, "strip",
|
78
|
+
}>, import('zod').ZodObject<{
|
79
|
+
'X-Api-Token': import('zod').ZodString;
|
80
|
+
}, "strip", import('zod').ZodTypeAny, {
|
82
81
|
'X-Api-Token': string;
|
83
82
|
}, {
|
84
83
|
'X-Api-Token': string;
|
85
|
-
}>,
|
86
|
-
'x-api-token':
|
87
|
-
}, "strip",
|
84
|
+
}>, import('zod').ZodObject<{
|
85
|
+
'x-api-token': import('zod').ZodString;
|
86
|
+
}, "strip", import('zod').ZodTypeAny, {
|
88
87
|
'x-api-token': string;
|
89
88
|
}, {
|
90
89
|
'x-api-token': string;
|
91
|
-
}>,
|
92
|
-
'X-API-TOKEN':
|
93
|
-
}, "strip",
|
90
|
+
}>, import('zod').ZodObject<{
|
91
|
+
'X-API-TOKEN': import('zod').ZodString;
|
92
|
+
}, "strip", import('zod').ZodTypeAny, {
|
94
93
|
'X-API-TOKEN': string;
|
95
94
|
}, {
|
96
95
|
'X-API-TOKEN': string;
|
97
|
-
}>]>]>,
|
98
|
-
'X-Lokalise-Plugin':
|
99
|
-
}, "strip",
|
96
|
+
}>]>]>, import('zod').ZodUnion<[import('zod').ZodObject<{
|
97
|
+
'X-Lokalise-Plugin': import('zod').ZodString;
|
98
|
+
}, "strip", import('zod').ZodTypeAny, {
|
100
99
|
'X-Lokalise-Plugin': string;
|
101
100
|
}, {
|
102
101
|
'X-Lokalise-Plugin': string;
|
103
|
-
}>,
|
104
|
-
'x-lokalise-plugin':
|
105
|
-
}, "strip",
|
102
|
+
}>, import('zod').ZodObject<{
|
103
|
+
'x-lokalise-plugin': import('zod').ZodString;
|
104
|
+
}, "strip", import('zod').ZodTypeAny, {
|
106
105
|
'x-lokalise-plugin': string;
|
107
106
|
}, {
|
108
107
|
'x-lokalise-plugin': string;
|
109
|
-
}>,
|
110
|
-
'X-LOKALISE-PLUGIN':
|
111
|
-
}, "strip",
|
108
|
+
}>, import('zod').ZodObject<{
|
109
|
+
'X-LOKALISE-PLUGIN': import('zod').ZodString;
|
110
|
+
}, "strip", import('zod').ZodTypeAny, {
|
112
111
|
'X-LOKALISE-PLUGIN': string;
|
113
112
|
}, {
|
114
113
|
'X-LOKALISE-PLUGIN': string;
|
@@ -129,9 +129,20 @@ export declare const CONTRIBUTOR_SCHEMA: z.ZodObject<{
|
|
129
129
|
is_reviewer: boolean;
|
130
130
|
}>;
|
131
131
|
export type Contributor = z.infer<typeof CONTRIBUTOR_SCHEMA>;
|
132
|
-
export declare const
|
132
|
+
export declare const RETRIEVE_CONTRIBUTOR_PATH_PARAMS_SCHEMA: z.ZodObject<{
|
133
|
+
projectId: z.ZodString;
|
134
|
+
contributorId: z.ZodNumber;
|
135
|
+
}, "strip", z.ZodTypeAny, {
|
136
|
+
projectId: string;
|
137
|
+
contributorId: number;
|
138
|
+
}, {
|
139
|
+
projectId: string;
|
140
|
+
contributorId: number;
|
141
|
+
}>;
|
142
|
+
export type RetrieveContributorPathParams = z.infer<typeof RETRIEVE_CONTRIBUTOR_PATH_PARAMS_SCHEMA>;
|
143
|
+
export declare const RETRIEVE_CONTRIBUTOR_RESPONSE_SCHEMA: z.ZodObject<{
|
133
144
|
project_id: z.ZodString;
|
134
|
-
|
145
|
+
contributor: z.ZodObject<{
|
135
146
|
user_id: z.ZodNumber;
|
136
147
|
email: z.ZodString;
|
137
148
|
fullname: z.ZodString;
|
@@ -186,9 +197,10 @@ export declare const RETRIEVE_CONTRIBUTORS_RESPONSE_SCHEMA: z.ZodObject<{
|
|
186
197
|
}[];
|
187
198
|
is_admin: boolean;
|
188
199
|
is_reviewer: boolean;
|
189
|
-
}
|
200
|
+
}>;
|
190
201
|
}, "strip", z.ZodTypeAny, {
|
191
|
-
|
202
|
+
project_id: string;
|
203
|
+
contributor: {
|
192
204
|
email: string;
|
193
205
|
user_id: number;
|
194
206
|
fullname: string;
|
@@ -203,10 +215,10 @@ export declare const RETRIEVE_CONTRIBUTORS_RESPONSE_SCHEMA: z.ZodObject<{
|
|
203
215
|
}[];
|
204
216
|
is_admin: boolean;
|
205
217
|
is_reviewer: boolean;
|
206
|
-
}
|
207
|
-
project_id: string;
|
218
|
+
};
|
208
219
|
}, {
|
209
|
-
|
220
|
+
project_id: string;
|
221
|
+
contributor: {
|
210
222
|
email: string;
|
211
223
|
user_id: number;
|
212
224
|
fullname: string;
|
@@ -221,7 +233,6 @@ export declare const RETRIEVE_CONTRIBUTORS_RESPONSE_SCHEMA: z.ZodObject<{
|
|
221
233
|
}[];
|
222
234
|
is_admin: boolean;
|
223
235
|
is_reviewer: boolean;
|
224
|
-
}
|
225
|
-
project_id: string;
|
236
|
+
};
|
226
237
|
}>;
|
227
|
-
export type
|
238
|
+
export type RetrieveContributorResponse = z.infer<typeof RETRIEVE_CONTRIBUTOR_RESPONSE_SCHEMA>;
|
@@ -78,6 +78,17 @@ export declare const TEAM_USER_SCHEMA: z.ZodObject<{
|
|
78
78
|
created_at_timestamp: number;
|
79
79
|
}>;
|
80
80
|
export type TeamUser = z.infer<typeof TEAM_USER_SCHEMA>;
|
81
|
+
export declare const TEAM_USER_PATH_PARAMS_SCHEMA: z.ZodObject<{
|
82
|
+
teamId: z.ZodNumber;
|
83
|
+
userId: z.ZodNumber;
|
84
|
+
}, "strip", z.ZodTypeAny, {
|
85
|
+
userId: number;
|
86
|
+
teamId: number;
|
87
|
+
}, {
|
88
|
+
userId: number;
|
89
|
+
teamId: number;
|
90
|
+
}>;
|
91
|
+
export type TeamUserPathParams = z.infer<typeof TEAM_USER_PATH_PARAMS_SCHEMA>;
|
81
92
|
export declare const TEAM_USER_RESPONSE_SCHEMA: z.ZodObject<{
|
82
93
|
team_id: z.ZodNumber;
|
83
94
|
team_user: z.ZodObject<{
|