@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.
@@ -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
- contributors: {
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
- }, z.ZodObject<{
9
- project_id: z.ZodString;
10
- contributors: z.ZodArray<z.ZodObject<{
11
- user_id: z.ZodNumber;
12
- email: z.ZodString;
13
- fullname: z.ZodString;
14
- created_at: z.ZodString;
15
- created_at_timestamp: z.ZodNumber;
16
- admin_rights: z.ZodArray<z.ZodString, "many">;
17
- languages: z.ZodArray<z.ZodObject<{
18
- lang_id: z.ZodNumber;
19
- lang_iso: z.ZodString;
20
- lang_name: z.ZodString;
21
- is_writable: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
22
- }, "strip", z.ZodTypeAny, {
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: z.ZodBoolean;
34
- is_reviewer: z.ZodBoolean;
35
- }, "strip", z.ZodTypeAny, {
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
- }>, "many">;
66
- }, "strip", z.ZodTypeAny, {
67
- contributors: {
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
- contributors: {
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
- project_id: string;
102
- }>, z.ZodObject<{
103
- projectId: z.ZodString;
104
- contributorId: z.ZodNumber;
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, z.ZodIntersection<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
112
- authorization: z.ZodString;
113
- }, "strip", z.ZodTypeAny, {
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
- }>, z.ZodObject<{
118
- AUTHORIZATION: z.ZodString;
119
- }, "strip", z.ZodTypeAny, {
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
- }>]>, z.ZodUnion<[z.ZodObject<{
124
- 'X-API-Token': z.ZodString;
125
- }, "strip", z.ZodTypeAny, {
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
- }>, z.ZodObject<{
130
- 'X-Api-Token': z.ZodString;
131
- }, "strip", z.ZodTypeAny, {
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
- }>, z.ZodObject<{
136
- 'x-api-token': z.ZodString;
137
- }, "strip", z.ZodTypeAny, {
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
- }>, z.ZodObject<{
142
- 'X-API-TOKEN': z.ZodString;
143
- }, "strip", z.ZodTypeAny, {
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
- }>]>]>, z.ZodUnion<[z.ZodObject<{
148
- 'X-Lokalise-Plugin': z.ZodString;
149
- }, "strip", z.ZodTypeAny, {
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
- }>, z.ZodObject<{
154
- 'x-lokalise-plugin': z.ZodString;
155
- }, "strip", z.ZodTypeAny, {
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
- }>, z.ZodObject<{
160
- 'X-LOKALISE-PLUGIN': z.ZodString;
161
- }, "strip", z.ZodTypeAny, {
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, RetrieveContributorsResponse } from '../types/contributorTypes';
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<RetrieveContributorsResponse, typeof retrieveContributorKeys>) => import('@tanstack/react-query').UseQueryResult<{
19
- contributors: {
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
- }, z.ZodObject<{
9
- team_id: z.ZodNumber;
10
- team_user: z.ZodObject<{
11
- user_id: z.ZodNumber;
12
- email: z.ZodString;
13
- fullname: z.ZodString;
14
- created_at: z.ZodString;
15
- created_at_timestamp: z.ZodNumber;
16
- role: z.ZodUnion<[z.ZodLiteral<"owner">, z.ZodLiteral<"admin">, z.ZodLiteral<"biller">, z.ZodLiteral<"member">]>;
17
- }, "strip", z.ZodTypeAny, {
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", z.ZodTypeAny, {
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
- }>, z.ZodObject<{
53
- teamId: z.ZodNumber;
54
- userId: z.ZodNumber;
55
- }, "strip", z.ZodTypeAny, {
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, z.ZodIntersection<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
62
- authorization: z.ZodString;
63
- }, "strip", z.ZodTypeAny, {
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
- }>, z.ZodObject<{
68
- AUTHORIZATION: z.ZodString;
69
- }, "strip", z.ZodTypeAny, {
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
- }>]>, z.ZodUnion<[z.ZodObject<{
74
- 'X-API-Token': z.ZodString;
75
- }, "strip", z.ZodTypeAny, {
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
- }>, z.ZodObject<{
80
- 'X-Api-Token': z.ZodString;
81
- }, "strip", z.ZodTypeAny, {
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
- }>, z.ZodObject<{
86
- 'x-api-token': z.ZodString;
87
- }, "strip", z.ZodTypeAny, {
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
- }>, z.ZodObject<{
92
- 'X-API-TOKEN': z.ZodString;
93
- }, "strip", z.ZodTypeAny, {
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
- }>]>]>, z.ZodUnion<[z.ZodObject<{
98
- 'X-Lokalise-Plugin': z.ZodString;
99
- }, "strip", z.ZodTypeAny, {
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
- }>, z.ZodObject<{
104
- 'x-lokalise-plugin': z.ZodString;
105
- }, "strip", z.ZodTypeAny, {
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
- }>, z.ZodObject<{
110
- 'X-LOKALISE-PLUGIN': z.ZodString;
111
- }, "strip", z.ZodTypeAny, {
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 RETRIEVE_CONTRIBUTORS_RESPONSE_SCHEMA: z.ZodObject<{
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
- contributors: z.ZodArray<z.ZodObject<{
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
- }>, "many">;
200
+ }>;
190
201
  }, "strip", z.ZodTypeAny, {
191
- contributors: {
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
- contributors: {
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 RetrieveContributorsResponse = z.infer<typeof RETRIEVE_CONTRIBUTORS_RESPONSE_SCHEMA>;
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<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokalise/harmony",
3
- "version": "1.20.2",
3
+ "version": "1.20.3",
4
4
  "author": {
5
5
  "name": "Lokalise",
6
6
  "url": "https://lokalise.com/"