@lokalise/workspaces-api-schemas 2.2.3 → 3.0.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/README.md +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -1
- package/dist/routeContracts/collaborationContracts.d.ts +32 -0
- package/dist/routeContracts/collaborationContracts.d.ts.map +1 -0
- package/dist/routeContracts/collaborationContracts.js +14 -0
- package/dist/routeContracts/collaborationContracts.js.map +1 -0
- package/dist/routeContracts/contributorsContracts.d.ts +335 -0
- package/dist/routeContracts/contributorsContracts.d.ts.map +1 -0
- package/dist/routeContracts/contributorsContracts.js +80 -0
- package/dist/routeContracts/contributorsContracts.js.map +1 -0
- package/dist/routeContracts/languagesContracts.d.ts +107 -0
- package/dist/routeContracts/languagesContracts.d.ts.map +1 -0
- package/dist/routeContracts/languagesContracts.js +29 -0
- package/dist/routeContracts/languagesContracts.js.map +1 -0
- package/dist/routeContracts/permissionTemplatesContracts.d.ts +58 -0
- package/dist/routeContracts/permissionTemplatesContracts.d.ts.map +1 -0
- package/dist/routeContracts/permissionTemplatesContracts.js +14 -0
- package/dist/routeContracts/permissionTemplatesContracts.js.map +1 -0
- package/dist/routeContracts/projectsContracts.d.ts +545 -0
- package/dist/routeContracts/projectsContracts.d.ts.map +1 -0
- package/dist/routeContracts/projectsContracts.js +62 -0
- package/dist/routeContracts/projectsContracts.js.map +1 -0
- package/dist/routeContracts/teamContracts.d.ts +107 -0
- package/dist/routeContracts/teamContracts.d.ts.map +1 -0
- package/dist/routeContracts/teamContracts.js +17 -0
- package/dist/routeContracts/teamContracts.js.map +1 -0
- package/dist/routeContracts/teamUsersContracts.d.ts +133 -0
- package/dist/routeContracts/teamUsersContracts.d.ts.map +1 -0
- package/dist/routeContracts/teamUsersContracts.js +35 -0
- package/dist/routeContracts/teamUsersContracts.js.map +1 -0
- package/dist/routeContracts/userTokenContracts.d.ts +24 -0
- package/dist/routeContracts/userTokenContracts.d.ts.map +1 -0
- package/dist/routeContracts/userTokenContracts.js +18 -0
- package/dist/routeContracts/userTokenContracts.js.map +1 -0
- package/dist/schemas/expert/style-guides.d.ts +72 -0
- package/dist/schemas/expert/style-guides.d.ts.map +1 -0
- package/dist/schemas/expert/style-guides.js +37 -0
- package/dist/schemas/expert/style-guides.js.map +1 -0
- package/dist/types/collaborationTypes.d.ts +22 -0
- package/dist/types/collaborationTypes.d.ts.map +1 -0
- package/dist/types/collaborationTypes.js +20 -0
- package/dist/types/collaborationTypes.js.map +1 -0
- package/dist/types/contributorTypes.d.ts +309 -0
- package/dist/types/contributorTypes.d.ts.map +1 -0
- package/dist/types/contributorTypes.js +125 -0
- package/dist/types/contributorTypes.js.map +1 -0
- package/dist/types/languageTypes.d.ts +90 -0
- package/dist/types/languageTypes.d.ts.map +1 -0
- package/dist/types/languageTypes.js +66 -0
- package/dist/types/languageTypes.js.map +1 -0
- package/dist/types/permissionTemplateTypes.d.ts +74 -0
- package/dist/types/permissionTemplateTypes.d.ts.map +1 -0
- package/dist/types/permissionTemplateTypes.js +20 -0
- package/dist/types/permissionTemplateTypes.js.map +1 -0
- package/dist/types/permissionTypes.d.ts +63 -0
- package/dist/types/permissionTypes.d.ts.map +1 -0
- package/dist/types/permissionTypes.js +23 -0
- package/dist/types/permissionTypes.js.map +1 -0
- package/dist/types/projectPermissionTypes.d.ts +62 -0
- package/dist/types/projectPermissionTypes.d.ts.map +1 -0
- package/dist/types/projectPermissionTypes.js +38 -0
- package/dist/types/projectPermissionTypes.js.map +1 -0
- package/dist/types/projectType.d.ts +11 -0
- package/dist/types/projectType.d.ts.map +1 -0
- package/dist/types/projectType.js +10 -0
- package/dist/types/projectType.js.map +1 -0
- package/dist/types/projectTypes.d.ts +507 -0
- package/dist/types/projectTypes.d.ts.map +1 -0
- package/dist/types/projectTypes.js +139 -0
- package/dist/types/projectTypes.js.map +1 -0
- package/dist/types/teamRoleTypes.d.ts +10 -0
- package/dist/types/teamRoleTypes.d.ts.map +1 -0
- package/dist/types/teamRoleTypes.js +4 -0
- package/dist/types/teamRoleTypes.js.map +1 -0
- package/dist/types/teamTypes.d.ts +162 -0
- package/dist/types/teamTypes.d.ts.map +1 -0
- package/dist/types/teamTypes.js +81 -0
- package/dist/types/teamTypes.js.map +1 -0
- package/dist/types/teamUserTypes.d.ts +137 -0
- package/dist/types/teamUserTypes.d.ts.map +1 -0
- package/dist/types/teamUserTypes.js +39 -0
- package/dist/types/teamUserTypes.js.map +1 -0
- package/dist/types/userTokenTypes.d.ts +21 -0
- package/dist/types/userTokenTypes.d.ts.map +1 -0
- package/dist/types/userTokenTypes.js +17 -0
- package/dist/types/userTokenTypes.js.map +1 -0
- package/package.json +1 -2
|
@@ -0,0 +1,507 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
export declare const PROJECT_ID_SCHEMA: z.ZodString;
|
|
3
|
+
export type ProjectId = z.infer<typeof PROJECT_ID_SCHEMA>;
|
|
4
|
+
export declare const PROJECT_ID_OR_UUID_SCHEMA: z.ZodUnion<readonly [z.ZodString, z.ZodGUID]>;
|
|
5
|
+
export type ProjectIdOrUuid = z.infer<typeof PROJECT_ID_OR_UUID_SCHEMA>;
|
|
6
|
+
export declare const PROJECT_API_BASE_HEADERS_SCHEMA: z.ZodIntersection<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
7
|
+
authorization: z.ZodString;
|
|
8
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
9
|
+
AUTHORIZATION: z.ZodString;
|
|
10
|
+
}, z.core.$strip>]>, z.ZodUnion<readonly [z.ZodObject<{
|
|
11
|
+
'X-API-Token': z.ZodString;
|
|
12
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
13
|
+
'X-Api-Token': z.ZodString;
|
|
14
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
15
|
+
'x-api-token': z.ZodString;
|
|
16
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
17
|
+
'X-API-TOKEN': z.ZodString;
|
|
18
|
+
}, z.core.$strip>]>]>, z.ZodUnion<readonly [z.ZodObject<{
|
|
19
|
+
'X-Lokalise-Plugin': z.ZodString;
|
|
20
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
21
|
+
'x-lokalise-plugin': z.ZodString;
|
|
22
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
23
|
+
'X-LOKALISE-PLUGIN': z.ZodString;
|
|
24
|
+
}, z.core.$strip>]>>;
|
|
25
|
+
export type ProjectApiBaseHeaders = z.infer<typeof PROJECT_API_BASE_HEADERS_SCHEMA>;
|
|
26
|
+
export declare const PROJECT_TYPE_SCHEMA: z.ZodEnum<{
|
|
27
|
+
localization_files: "localization_files";
|
|
28
|
+
paged_documents: "paged_documents";
|
|
29
|
+
content_integration: "content_integration";
|
|
30
|
+
marketing: "marketing";
|
|
31
|
+
marketing_integrations: "marketing_integrations";
|
|
32
|
+
}>;
|
|
33
|
+
export declare const AVAILABILITY_DISABLED_REASONS: readonly ["management"];
|
|
34
|
+
export declare const AVAILABILITY_DISABLED_REASON_SCHEMA: z.ZodEnum<{
|
|
35
|
+
management: "management";
|
|
36
|
+
}>;
|
|
37
|
+
export type AvailabilityDisabledReason = z.infer<typeof AVAILABILITY_DISABLED_REASON_SCHEMA>;
|
|
38
|
+
export declare const AVAILABILITY_SCHEMA: z.ZodObject<{
|
|
39
|
+
disabled: z.ZodBoolean;
|
|
40
|
+
disabledReason: z.ZodNullable<z.ZodEnum<{
|
|
41
|
+
management: "management";
|
|
42
|
+
}>>;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
export type Availability = z.infer<typeof AVAILABILITY_SCHEMA>;
|
|
45
|
+
export declare const PROJECT_SETTINGS_SCHEMA: z.ZodObject<{
|
|
46
|
+
per_platform_key_names: z.ZodBoolean;
|
|
47
|
+
reviewing: z.ZodBoolean;
|
|
48
|
+
auto_toggle_unverified: z.ZodBoolean;
|
|
49
|
+
offline_translation: z.ZodBoolean;
|
|
50
|
+
key_editing: z.ZodBoolean;
|
|
51
|
+
branching: z.ZodBoolean;
|
|
52
|
+
inline_machine_translations: z.ZodBoolean;
|
|
53
|
+
custom_translation_statuses: z.ZodBoolean;
|
|
54
|
+
custom_translation_statuses_allow_multiple: z.ZodBoolean;
|
|
55
|
+
segmentation: z.ZodBoolean;
|
|
56
|
+
contributor_preview_download_enabled: z.ZodBoolean;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
export type ProjectSettings = z.infer<typeof PROJECT_SETTINGS_SCHEMA>;
|
|
59
|
+
export declare const PROJECT_QA_ISSUES_SCHEMA: z.ZodObject<{
|
|
60
|
+
not_reviewed: z.ZodNumber;
|
|
61
|
+
unverified: z.ZodNumber;
|
|
62
|
+
spelling_grammar: z.ZodNumber;
|
|
63
|
+
inconsistent_placeholders: z.ZodNumber;
|
|
64
|
+
inconsistent_html: z.ZodNumber;
|
|
65
|
+
different_number_of_urls: z.ZodNumber;
|
|
66
|
+
different_urls: z.ZodNumber;
|
|
67
|
+
leading_whitespace: z.ZodNumber;
|
|
68
|
+
trailing_whitespace: z.ZodNumber;
|
|
69
|
+
different_number_of_email_address: z.ZodNumber;
|
|
70
|
+
different_email_address: z.ZodNumber;
|
|
71
|
+
different_brackets: z.ZodNumber;
|
|
72
|
+
different_numbers: z.ZodNumber;
|
|
73
|
+
double_space: z.ZodNumber;
|
|
74
|
+
special_placeholder: z.ZodNumber;
|
|
75
|
+
unbalanced_brackets: z.ZodNumber;
|
|
76
|
+
}, z.core.$strip>;
|
|
77
|
+
export type ProjectQaIssues = z.infer<typeof PROJECT_QA_ISSUES_SCHEMA>;
|
|
78
|
+
export declare const PROJECT_STATISTICS_SCHEMA: z.ZodObject<{
|
|
79
|
+
progress_total: z.ZodNumber;
|
|
80
|
+
keys_total: z.ZodNumber;
|
|
81
|
+
team: z.ZodNumber;
|
|
82
|
+
base_words: z.ZodNumber;
|
|
83
|
+
qa_issues_total: z.ZodNumber;
|
|
84
|
+
qa_issues: z.ZodObject<{
|
|
85
|
+
not_reviewed: z.ZodNumber;
|
|
86
|
+
unverified: z.ZodNumber;
|
|
87
|
+
spelling_grammar: z.ZodNumber;
|
|
88
|
+
inconsistent_placeholders: z.ZodNumber;
|
|
89
|
+
inconsistent_html: z.ZodNumber;
|
|
90
|
+
different_number_of_urls: z.ZodNumber;
|
|
91
|
+
different_urls: z.ZodNumber;
|
|
92
|
+
leading_whitespace: z.ZodNumber;
|
|
93
|
+
trailing_whitespace: z.ZodNumber;
|
|
94
|
+
different_number_of_email_address: z.ZodNumber;
|
|
95
|
+
different_email_address: z.ZodNumber;
|
|
96
|
+
different_brackets: z.ZodNumber;
|
|
97
|
+
different_numbers: z.ZodNumber;
|
|
98
|
+
double_space: z.ZodNumber;
|
|
99
|
+
special_placeholder: z.ZodNumber;
|
|
100
|
+
unbalanced_brackets: z.ZodNumber;
|
|
101
|
+
}, z.core.$strip>;
|
|
102
|
+
languages: z.ZodArray<z.ZodObject<{
|
|
103
|
+
language_id: z.ZodNumber;
|
|
104
|
+
language_iso: z.ZodString;
|
|
105
|
+
progress: z.ZodNumber;
|
|
106
|
+
words_to_do: z.ZodNumber;
|
|
107
|
+
project_language_id: z.ZodNumber;
|
|
108
|
+
project_language_uuid: z.ZodGUID;
|
|
109
|
+
}, z.core.$strip>>;
|
|
110
|
+
}, z.core.$strip>;
|
|
111
|
+
/**
|
|
112
|
+
* API_ Prefix was added to avoid clash with other PermissionSchema defined in permission/api.ts
|
|
113
|
+
* This is a workaround to release the code and unblock the task and should be revisited
|
|
114
|
+
*/
|
|
115
|
+
export declare const API_PROJECT_SCHEMA: z.ZodObject<{
|
|
116
|
+
project_id: z.ZodString;
|
|
117
|
+
uuid: z.ZodGUID;
|
|
118
|
+
project_type: z.ZodEnum<{
|
|
119
|
+
localization_files: "localization_files";
|
|
120
|
+
paged_documents: "paged_documents";
|
|
121
|
+
content_integration: "content_integration";
|
|
122
|
+
marketing: "marketing";
|
|
123
|
+
marketing_integrations: "marketing_integrations";
|
|
124
|
+
}>;
|
|
125
|
+
name: z.ZodString;
|
|
126
|
+
description: z.ZodString;
|
|
127
|
+
created_at: z.ZodString;
|
|
128
|
+
created_at_timestamp: z.ZodNumber;
|
|
129
|
+
created_by: z.ZodNumber;
|
|
130
|
+
created_by_email: z.ZodString;
|
|
131
|
+
team_id: z.ZodNumber;
|
|
132
|
+
team_uuid: z.ZodGUID;
|
|
133
|
+
base_language_id: z.ZodNumber;
|
|
134
|
+
base_language_iso: z.ZodString;
|
|
135
|
+
base_project_language_id: z.ZodNumber;
|
|
136
|
+
base_project_language_uuid: z.ZodGUID;
|
|
137
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
138
|
+
per_platform_key_names: z.ZodBoolean;
|
|
139
|
+
reviewing: z.ZodBoolean;
|
|
140
|
+
auto_toggle_unverified: z.ZodBoolean;
|
|
141
|
+
offline_translation: z.ZodBoolean;
|
|
142
|
+
key_editing: z.ZodBoolean;
|
|
143
|
+
branching: z.ZodBoolean;
|
|
144
|
+
inline_machine_translations: z.ZodBoolean;
|
|
145
|
+
custom_translation_statuses: z.ZodBoolean;
|
|
146
|
+
custom_translation_statuses_allow_multiple: z.ZodBoolean;
|
|
147
|
+
segmentation: z.ZodBoolean;
|
|
148
|
+
contributor_preview_download_enabled: z.ZodBoolean;
|
|
149
|
+
}, z.core.$strip>>;
|
|
150
|
+
statistics: z.ZodOptional<z.ZodObject<{
|
|
151
|
+
progress_total: z.ZodNumber;
|
|
152
|
+
keys_total: z.ZodNumber;
|
|
153
|
+
team: z.ZodNumber;
|
|
154
|
+
base_words: z.ZodNumber;
|
|
155
|
+
qa_issues_total: z.ZodNumber;
|
|
156
|
+
qa_issues: z.ZodObject<{
|
|
157
|
+
not_reviewed: z.ZodNumber;
|
|
158
|
+
unverified: z.ZodNumber;
|
|
159
|
+
spelling_grammar: z.ZodNumber;
|
|
160
|
+
inconsistent_placeholders: z.ZodNumber;
|
|
161
|
+
inconsistent_html: z.ZodNumber;
|
|
162
|
+
different_number_of_urls: z.ZodNumber;
|
|
163
|
+
different_urls: z.ZodNumber;
|
|
164
|
+
leading_whitespace: z.ZodNumber;
|
|
165
|
+
trailing_whitespace: z.ZodNumber;
|
|
166
|
+
different_number_of_email_address: z.ZodNumber;
|
|
167
|
+
different_email_address: z.ZodNumber;
|
|
168
|
+
different_brackets: z.ZodNumber;
|
|
169
|
+
different_numbers: z.ZodNumber;
|
|
170
|
+
double_space: z.ZodNumber;
|
|
171
|
+
special_placeholder: z.ZodNumber;
|
|
172
|
+
unbalanced_brackets: z.ZodNumber;
|
|
173
|
+
}, z.core.$strip>;
|
|
174
|
+
languages: z.ZodArray<z.ZodObject<{
|
|
175
|
+
language_id: z.ZodNumber;
|
|
176
|
+
language_iso: z.ZodString;
|
|
177
|
+
progress: z.ZodNumber;
|
|
178
|
+
words_to_do: z.ZodNumber;
|
|
179
|
+
project_language_id: z.ZodNumber;
|
|
180
|
+
project_language_uuid: z.ZodGUID;
|
|
181
|
+
}, z.core.$strip>>;
|
|
182
|
+
}, z.core.$strip>>;
|
|
183
|
+
}, z.core.$strip>;
|
|
184
|
+
export type ApiProject = z.infer<typeof API_PROJECT_SCHEMA>;
|
|
185
|
+
export declare const CREATE_PROJECT_REQUEST_BODY_SCHEMA: z.ZodObject<{
|
|
186
|
+
name: z.ZodString;
|
|
187
|
+
team_id: z.ZodString;
|
|
188
|
+
base_lang_iso: z.ZodString;
|
|
189
|
+
languages: z.ZodArray<z.ZodObject<{
|
|
190
|
+
lang_iso: z.ZodString;
|
|
191
|
+
custom_iso: z.ZodOptional<z.ZodString>;
|
|
192
|
+
}, z.core.$strip>>;
|
|
193
|
+
project_type: z.ZodEnum<{
|
|
194
|
+
localization_files: "localization_files";
|
|
195
|
+
paged_documents: "paged_documents";
|
|
196
|
+
content_integration: "content_integration";
|
|
197
|
+
marketing: "marketing";
|
|
198
|
+
marketing_integrations: "marketing_integrations";
|
|
199
|
+
}>;
|
|
200
|
+
is_segmentation_enabled: z.ZodBoolean;
|
|
201
|
+
}, z.core.$strip>;
|
|
202
|
+
export type CreateProjectRequestBody = z.infer<typeof CREATE_PROJECT_REQUEST_BODY_SCHEMA>;
|
|
203
|
+
export declare const LIST_PROJECTS_REQUEST_QUERY_SCHEMA: z.ZodObject<{
|
|
204
|
+
filter_type: z.ZodOptional<z.ZodEnum<{
|
|
205
|
+
localization_files: "localization_files";
|
|
206
|
+
paged_documents: "paged_documents";
|
|
207
|
+
content_integration: "content_integration";
|
|
208
|
+
marketing: "marketing";
|
|
209
|
+
marketing_integrations: "marketing_integrations";
|
|
210
|
+
}>>;
|
|
211
|
+
filter_team_id: z.ZodOptional<z.ZodNumber>;
|
|
212
|
+
filter_names: z.ZodOptional<z.ZodString>;
|
|
213
|
+
include_statistics: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>>;
|
|
214
|
+
include_settings: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>>;
|
|
215
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
216
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
217
|
+
}, z.core.$strip>;
|
|
218
|
+
export type ListProjectsRequestQuery = z.infer<typeof LIST_PROJECTS_REQUEST_QUERY_SCHEMA>;
|
|
219
|
+
export declare const LIST_PROJECTS_SUCCESS_RESPONSE_BODY: z.ZodObject<{
|
|
220
|
+
projects: z.ZodArray<z.ZodObject<{
|
|
221
|
+
project_id: z.ZodString;
|
|
222
|
+
uuid: z.ZodGUID;
|
|
223
|
+
project_type: z.ZodEnum<{
|
|
224
|
+
localization_files: "localization_files";
|
|
225
|
+
paged_documents: "paged_documents";
|
|
226
|
+
content_integration: "content_integration";
|
|
227
|
+
marketing: "marketing";
|
|
228
|
+
marketing_integrations: "marketing_integrations";
|
|
229
|
+
}>;
|
|
230
|
+
name: z.ZodString;
|
|
231
|
+
description: z.ZodString;
|
|
232
|
+
created_at: z.ZodString;
|
|
233
|
+
created_at_timestamp: z.ZodNumber;
|
|
234
|
+
created_by: z.ZodNumber;
|
|
235
|
+
created_by_email: z.ZodString;
|
|
236
|
+
team_id: z.ZodNumber;
|
|
237
|
+
team_uuid: z.ZodGUID;
|
|
238
|
+
base_language_id: z.ZodNumber;
|
|
239
|
+
base_language_iso: z.ZodString;
|
|
240
|
+
base_project_language_id: z.ZodNumber;
|
|
241
|
+
base_project_language_uuid: z.ZodGUID;
|
|
242
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
243
|
+
per_platform_key_names: z.ZodBoolean;
|
|
244
|
+
reviewing: z.ZodBoolean;
|
|
245
|
+
auto_toggle_unverified: z.ZodBoolean;
|
|
246
|
+
offline_translation: z.ZodBoolean;
|
|
247
|
+
key_editing: z.ZodBoolean;
|
|
248
|
+
branching: z.ZodBoolean;
|
|
249
|
+
inline_machine_translations: z.ZodBoolean;
|
|
250
|
+
custom_translation_statuses: z.ZodBoolean;
|
|
251
|
+
custom_translation_statuses_allow_multiple: z.ZodBoolean;
|
|
252
|
+
segmentation: z.ZodBoolean;
|
|
253
|
+
contributor_preview_download_enabled: z.ZodBoolean;
|
|
254
|
+
}, z.core.$strip>>;
|
|
255
|
+
statistics: z.ZodOptional<z.ZodObject<{
|
|
256
|
+
progress_total: z.ZodNumber;
|
|
257
|
+
keys_total: z.ZodNumber;
|
|
258
|
+
team: z.ZodNumber;
|
|
259
|
+
base_words: z.ZodNumber;
|
|
260
|
+
qa_issues_total: z.ZodNumber;
|
|
261
|
+
qa_issues: z.ZodObject<{
|
|
262
|
+
not_reviewed: z.ZodNumber;
|
|
263
|
+
unverified: z.ZodNumber;
|
|
264
|
+
spelling_grammar: z.ZodNumber;
|
|
265
|
+
inconsistent_placeholders: z.ZodNumber;
|
|
266
|
+
inconsistent_html: z.ZodNumber;
|
|
267
|
+
different_number_of_urls: z.ZodNumber;
|
|
268
|
+
different_urls: z.ZodNumber;
|
|
269
|
+
leading_whitespace: z.ZodNumber;
|
|
270
|
+
trailing_whitespace: z.ZodNumber;
|
|
271
|
+
different_number_of_email_address: z.ZodNumber;
|
|
272
|
+
different_email_address: z.ZodNumber;
|
|
273
|
+
different_brackets: z.ZodNumber;
|
|
274
|
+
different_numbers: z.ZodNumber;
|
|
275
|
+
double_space: z.ZodNumber;
|
|
276
|
+
special_placeholder: z.ZodNumber;
|
|
277
|
+
unbalanced_brackets: z.ZodNumber;
|
|
278
|
+
}, z.core.$strip>;
|
|
279
|
+
languages: z.ZodArray<z.ZodObject<{
|
|
280
|
+
language_id: z.ZodNumber;
|
|
281
|
+
language_iso: z.ZodString;
|
|
282
|
+
progress: z.ZodNumber;
|
|
283
|
+
words_to_do: z.ZodNumber;
|
|
284
|
+
project_language_id: z.ZodNumber;
|
|
285
|
+
project_language_uuid: z.ZodGUID;
|
|
286
|
+
}, z.core.$strip>>;
|
|
287
|
+
}, z.core.$strip>>;
|
|
288
|
+
}, z.core.$strip>>;
|
|
289
|
+
}, z.core.$strip>;
|
|
290
|
+
export type ListProjectsSuccessResponseBody = z.infer<typeof LIST_PROJECTS_SUCCESS_RESPONSE_BODY>;
|
|
291
|
+
export declare const PROJECT_ID_PATH_PARAM_SCHEMA: z.ZodObject<{
|
|
292
|
+
projectId: z.ZodUnion<readonly [z.ZodString, z.ZodGUID]>;
|
|
293
|
+
}, z.core.$strip>;
|
|
294
|
+
export type ProjectIdPathParam = z.infer<typeof PROJECT_ID_PATH_PARAM_SCHEMA>;
|
|
295
|
+
export declare const UPDATE_PROJECT_REQUEST_BODY_SCHEMA: z.ZodObject<{
|
|
296
|
+
name: z.ZodString;
|
|
297
|
+
description: z.ZodOptional<z.ZodString>;
|
|
298
|
+
}, z.core.$strip>;
|
|
299
|
+
export type UpdateProjectRequestBody = z.infer<typeof UPDATE_PROJECT_REQUEST_BODY_SCHEMA>;
|
|
300
|
+
declare const PROJECT_PERMISSION_DETAILS_META_SCHEMA: z.ZodObject<{
|
|
301
|
+
id: z.ZodUnion<readonly [z.ZodEnum<{
|
|
302
|
+
contributors: "contributors";
|
|
303
|
+
tasks: "tasks";
|
|
304
|
+
upload: "upload";
|
|
305
|
+
activity: "activity";
|
|
306
|
+
download: "download";
|
|
307
|
+
glossary_edit: "glossary_edit";
|
|
308
|
+
glossary_delete: "glossary_delete";
|
|
309
|
+
settings: "settings";
|
|
310
|
+
statistics: "statistics";
|
|
311
|
+
manage_keys: "manage_keys";
|
|
312
|
+
screenshots: "screenshots";
|
|
313
|
+
branches_create: "branches_create";
|
|
314
|
+
branches_merge: "branches_merge";
|
|
315
|
+
manage_languages: "manage_languages";
|
|
316
|
+
review: "review";
|
|
317
|
+
branches_main_modify: "branches_main_modify";
|
|
318
|
+
custom_status_modify: "custom_status_modify";
|
|
319
|
+
}>, z.ZodEnum<{
|
|
320
|
+
glossary: "glossary";
|
|
321
|
+
create_branches: "create_branches";
|
|
322
|
+
}>]>;
|
|
323
|
+
scope: z.ZodUnion<readonly [z.ZodLiteral<"project">, z.ZodLiteral<"team">, z.ZodLiteral<"user">]>;
|
|
324
|
+
title: z.ZodString;
|
|
325
|
+
group: z.ZodString;
|
|
326
|
+
description: z.ZodNullable<z.ZodString>;
|
|
327
|
+
dependentPermissions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
328
|
+
contributors: "contributors";
|
|
329
|
+
tasks: "tasks";
|
|
330
|
+
upload: "upload";
|
|
331
|
+
activity: "activity";
|
|
332
|
+
download: "download";
|
|
333
|
+
glossary_edit: "glossary_edit";
|
|
334
|
+
glossary_delete: "glossary_delete";
|
|
335
|
+
settings: "settings";
|
|
336
|
+
statistics: "statistics";
|
|
337
|
+
manage_keys: "manage_keys";
|
|
338
|
+
screenshots: "screenshots";
|
|
339
|
+
branches_create: "branches_create";
|
|
340
|
+
branches_merge: "branches_merge";
|
|
341
|
+
manage_languages: "manage_languages";
|
|
342
|
+
review: "review";
|
|
343
|
+
branches_main_modify: "branches_main_modify";
|
|
344
|
+
custom_status_modify: "custom_status_modify";
|
|
345
|
+
}>, z.ZodEnum<{
|
|
346
|
+
glossary: "glossary";
|
|
347
|
+
create_branches: "create_branches";
|
|
348
|
+
}>]>>>;
|
|
349
|
+
doesSetAllReadOnlyLanguages: z.ZodBoolean;
|
|
350
|
+
newPermission: z.ZodOptional<z.ZodBoolean>;
|
|
351
|
+
isHidden: z.ZodOptional<z.ZodBoolean>;
|
|
352
|
+
availability: z.ZodOptional<z.ZodObject<{
|
|
353
|
+
disabled: z.ZodBoolean;
|
|
354
|
+
disabledReason: z.ZodNullable<z.ZodEnum<{
|
|
355
|
+
management: "management";
|
|
356
|
+
}>>;
|
|
357
|
+
}, z.core.$strip>>;
|
|
358
|
+
}, z.core.$strip>;
|
|
359
|
+
export type ProjectPermissionDetailsMeta = z.infer<typeof PROJECT_PERMISSION_DETAILS_META_SCHEMA>;
|
|
360
|
+
declare const PROJECT_PERMISSION_TEMPLATE_DETAILS_META_SCHEMA: z.ZodObject<{
|
|
361
|
+
id: z.ZodNumber;
|
|
362
|
+
role: z.ZodString;
|
|
363
|
+
permissions: z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
364
|
+
contributors: "contributors";
|
|
365
|
+
tasks: "tasks";
|
|
366
|
+
upload: "upload";
|
|
367
|
+
activity: "activity";
|
|
368
|
+
download: "download";
|
|
369
|
+
glossary_edit: "glossary_edit";
|
|
370
|
+
glossary_delete: "glossary_delete";
|
|
371
|
+
settings: "settings";
|
|
372
|
+
statistics: "statistics";
|
|
373
|
+
manage_keys: "manage_keys";
|
|
374
|
+
screenshots: "screenshots";
|
|
375
|
+
branches_create: "branches_create";
|
|
376
|
+
branches_merge: "branches_merge";
|
|
377
|
+
manage_languages: "manage_languages";
|
|
378
|
+
review: "review";
|
|
379
|
+
branches_main_modify: "branches_main_modify";
|
|
380
|
+
custom_status_modify: "custom_status_modify";
|
|
381
|
+
}>, z.ZodEnum<{
|
|
382
|
+
glossary: "glossary";
|
|
383
|
+
create_branches: "create_branches";
|
|
384
|
+
}>]>>;
|
|
385
|
+
description: z.ZodNullable<z.ZodString>;
|
|
386
|
+
tag: z.ZodNullable<z.ZodString>;
|
|
387
|
+
tagColor: z.ZodNullable<z.ZodString>;
|
|
388
|
+
tagInfo: z.ZodNullable<z.ZodString>;
|
|
389
|
+
isForMarketingProjects: z.ZodBoolean;
|
|
390
|
+
doesEnableAllReadOnlyLanguages: z.ZodBoolean;
|
|
391
|
+
availability: z.ZodOptional<z.ZodObject<{
|
|
392
|
+
disabled: z.ZodBoolean;
|
|
393
|
+
disabledReason: z.ZodNullable<z.ZodEnum<{
|
|
394
|
+
management: "management";
|
|
395
|
+
}>>;
|
|
396
|
+
}, z.core.$strip>>;
|
|
397
|
+
}, z.core.$strip>;
|
|
398
|
+
export type ProjectPermissionTemplateDetailsMeta = z.infer<typeof PROJECT_PERMISSION_TEMPLATE_DETAILS_META_SCHEMA>;
|
|
399
|
+
export declare const GET_PROJECT_PERMISSION_META_RESPONSE_BODY_SCHEMA: z.ZodObject<{
|
|
400
|
+
project_id: z.ZodString;
|
|
401
|
+
project_uuid: z.ZodGUID;
|
|
402
|
+
permissions: z.ZodArray<z.ZodObject<{
|
|
403
|
+
id: z.ZodUnion<readonly [z.ZodEnum<{
|
|
404
|
+
contributors: "contributors";
|
|
405
|
+
tasks: "tasks";
|
|
406
|
+
upload: "upload";
|
|
407
|
+
activity: "activity";
|
|
408
|
+
download: "download";
|
|
409
|
+
glossary_edit: "glossary_edit";
|
|
410
|
+
glossary_delete: "glossary_delete";
|
|
411
|
+
settings: "settings";
|
|
412
|
+
statistics: "statistics";
|
|
413
|
+
manage_keys: "manage_keys";
|
|
414
|
+
screenshots: "screenshots";
|
|
415
|
+
branches_create: "branches_create";
|
|
416
|
+
branches_merge: "branches_merge";
|
|
417
|
+
manage_languages: "manage_languages";
|
|
418
|
+
review: "review";
|
|
419
|
+
branches_main_modify: "branches_main_modify";
|
|
420
|
+
custom_status_modify: "custom_status_modify";
|
|
421
|
+
}>, z.ZodEnum<{
|
|
422
|
+
glossary: "glossary";
|
|
423
|
+
create_branches: "create_branches";
|
|
424
|
+
}>]>;
|
|
425
|
+
scope: z.ZodUnion<readonly [z.ZodLiteral<"project">, z.ZodLiteral<"team">, z.ZodLiteral<"user">]>;
|
|
426
|
+
title: z.ZodString;
|
|
427
|
+
group: z.ZodString;
|
|
428
|
+
description: z.ZodNullable<z.ZodString>;
|
|
429
|
+
dependentPermissions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
430
|
+
contributors: "contributors";
|
|
431
|
+
tasks: "tasks";
|
|
432
|
+
upload: "upload";
|
|
433
|
+
activity: "activity";
|
|
434
|
+
download: "download";
|
|
435
|
+
glossary_edit: "glossary_edit";
|
|
436
|
+
glossary_delete: "glossary_delete";
|
|
437
|
+
settings: "settings";
|
|
438
|
+
statistics: "statistics";
|
|
439
|
+
manage_keys: "manage_keys";
|
|
440
|
+
screenshots: "screenshots";
|
|
441
|
+
branches_create: "branches_create";
|
|
442
|
+
branches_merge: "branches_merge";
|
|
443
|
+
manage_languages: "manage_languages";
|
|
444
|
+
review: "review";
|
|
445
|
+
branches_main_modify: "branches_main_modify";
|
|
446
|
+
custom_status_modify: "custom_status_modify";
|
|
447
|
+
}>, z.ZodEnum<{
|
|
448
|
+
glossary: "glossary";
|
|
449
|
+
create_branches: "create_branches";
|
|
450
|
+
}>]>>>;
|
|
451
|
+
doesSetAllReadOnlyLanguages: z.ZodBoolean;
|
|
452
|
+
newPermission: z.ZodOptional<z.ZodBoolean>;
|
|
453
|
+
isHidden: z.ZodOptional<z.ZodBoolean>;
|
|
454
|
+
availability: z.ZodOptional<z.ZodObject<{
|
|
455
|
+
disabled: z.ZodBoolean;
|
|
456
|
+
disabledReason: z.ZodNullable<z.ZodEnum<{
|
|
457
|
+
management: "management";
|
|
458
|
+
}>>;
|
|
459
|
+
}, z.core.$strip>>;
|
|
460
|
+
}, z.core.$strip>>;
|
|
461
|
+
roles: z.ZodArray<z.ZodObject<{
|
|
462
|
+
id: z.ZodNumber;
|
|
463
|
+
role: z.ZodString;
|
|
464
|
+
permissions: z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
465
|
+
contributors: "contributors";
|
|
466
|
+
tasks: "tasks";
|
|
467
|
+
upload: "upload";
|
|
468
|
+
activity: "activity";
|
|
469
|
+
download: "download";
|
|
470
|
+
glossary_edit: "glossary_edit";
|
|
471
|
+
glossary_delete: "glossary_delete";
|
|
472
|
+
settings: "settings";
|
|
473
|
+
statistics: "statistics";
|
|
474
|
+
manage_keys: "manage_keys";
|
|
475
|
+
screenshots: "screenshots";
|
|
476
|
+
branches_create: "branches_create";
|
|
477
|
+
branches_merge: "branches_merge";
|
|
478
|
+
manage_languages: "manage_languages";
|
|
479
|
+
review: "review";
|
|
480
|
+
branches_main_modify: "branches_main_modify";
|
|
481
|
+
custom_status_modify: "custom_status_modify";
|
|
482
|
+
}>, z.ZodEnum<{
|
|
483
|
+
glossary: "glossary";
|
|
484
|
+
create_branches: "create_branches";
|
|
485
|
+
}>]>>;
|
|
486
|
+
description: z.ZodNullable<z.ZodString>;
|
|
487
|
+
tag: z.ZodNullable<z.ZodString>;
|
|
488
|
+
tagColor: z.ZodNullable<z.ZodString>;
|
|
489
|
+
tagInfo: z.ZodNullable<z.ZodString>;
|
|
490
|
+
isForMarketingProjects: z.ZodBoolean;
|
|
491
|
+
doesEnableAllReadOnlyLanguages: z.ZodBoolean;
|
|
492
|
+
availability: z.ZodOptional<z.ZodObject<{
|
|
493
|
+
disabled: z.ZodBoolean;
|
|
494
|
+
disabledReason: z.ZodNullable<z.ZodEnum<{
|
|
495
|
+
management: "management";
|
|
496
|
+
}>>;
|
|
497
|
+
}, z.core.$strip>>;
|
|
498
|
+
}, z.core.$strip>>;
|
|
499
|
+
}, z.core.$strip>;
|
|
500
|
+
export type GetProjectPermissionMetaResponseBody = z.infer<typeof GET_PROJECT_PERMISSION_META_RESPONSE_BODY_SCHEMA>;
|
|
501
|
+
export declare const DELETE_PROJECT_RESPONSE_SCHEMA: z.ZodObject<{
|
|
502
|
+
project_id: z.ZodString;
|
|
503
|
+
project_deleted: z.ZodBoolean;
|
|
504
|
+
}, z.core.$strip>;
|
|
505
|
+
export type DeleteProjectResponse = z.infer<typeof DELETE_PROJECT_RESPONSE_SCHEMA>;
|
|
506
|
+
export {};
|
|
507
|
+
//# sourceMappingURL=projectTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projectTypes.d.ts","sourceRoot":"","sources":["../../src/types/projectTypes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAK1B,eAAO,MAAM,iBAAiB,aAA+C,CAAA;AAC7E,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAEzD,eAAO,MAAM,yBAAyB,+CAAyC,CAAA;AAC/E,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAEvE,eAAO,MAAM,+BAA+B;mBA4BlB,EAAG,SAAS;;mBAEnC,EAAG,SAAS;;mBAEoB,EAAG,SAAS;;mBAElB,EAAG,SAAS;;mBAE1B,EAAG,SACjB;;mBACqB,EAAG,SAAS;;yBAG9B,EAAG,SAAS;;yBAEL,EAAG,SAAS;;yBACwB,EAC7C,SAAQ;oBA7CoE,CAAA;AAE9E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAA;AAEnF,eAAO,MAAM,mBAAmB;;;;;;EAAwB,CAAA;AAExD,eAAO,MAAM,6BAA6B,yBAA0B,CAAA;AAEpE,eAAO,MAAM,mCAAmC;;EAAwC,CAAA;AAExF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAA;AAE5F,eAAO,MAAM,mBAAmB;;;;;iBAG9B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AC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAE7E,eAAO,MAAM,kCAAkC;;;iBAG7C,CAAA;AAEF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAA;AAEzF,QAAA,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAW1C,CAAA;AACF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAA;AAEjG,QAAA,MAAM,+CAA+C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAWnD,CAAA;AAEF,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CACxD,OAAO,+CAA+C,CACvD,CAAA;AAED,eAAO,MAAM,gDAAgD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAK3D,CAAA;AAEF,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CACxD,OAAO,gDAAgD,CACxD,CAAA;AAED,eAAO,MAAM,8BAA8B;;;iBAGzC,CAAA;AAEF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAA"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { BASE_API_ENDPOINT_HEADER_SCHEMA } from '@lokalise/common-api-schemas';
|
|
2
|
+
import { z } from 'zod/v4';
|
|
3
|
+
import { LANGUAGE_ISO_SCHEMA, LANGUAGE_STATISTICS_SCHEMA } from "./languageTypes.js";
|
|
4
|
+
import { API_PERMISSION_SCOPE_SCHEMA, PERMISSION_ID_SCHEMA } from "./permissionTypes.js";
|
|
5
|
+
import { PROJECT_TYPES } from "./projectType.js";
|
|
6
|
+
export const PROJECT_ID_SCHEMA = z.string().regex(/^[a-zA-Z0-9]{22}\.\d{8}$/);
|
|
7
|
+
export const PROJECT_ID_OR_UUID_SCHEMA = z.union([PROJECT_ID_SCHEMA, z.guid()]);
|
|
8
|
+
export const PROJECT_API_BASE_HEADERS_SCHEMA = BASE_API_ENDPOINT_HEADER_SCHEMA;
|
|
9
|
+
export const PROJECT_TYPE_SCHEMA = z.enum(PROJECT_TYPES);
|
|
10
|
+
export const AVAILABILITY_DISABLED_REASONS = ['management'];
|
|
11
|
+
export const AVAILABILITY_DISABLED_REASON_SCHEMA = z.enum(AVAILABILITY_DISABLED_REASONS);
|
|
12
|
+
export const AVAILABILITY_SCHEMA = z.object({
|
|
13
|
+
disabled: z.boolean(),
|
|
14
|
+
disabledReason: AVAILABILITY_DISABLED_REASON_SCHEMA.nullable(),
|
|
15
|
+
});
|
|
16
|
+
export const PROJECT_SETTINGS_SCHEMA = z.object({
|
|
17
|
+
per_platform_key_names: z.boolean(),
|
|
18
|
+
reviewing: z.boolean(),
|
|
19
|
+
auto_toggle_unverified: z.boolean(),
|
|
20
|
+
offline_translation: z.boolean(),
|
|
21
|
+
key_editing: z.boolean(),
|
|
22
|
+
branching: z.boolean(),
|
|
23
|
+
inline_machine_translations: z.boolean(),
|
|
24
|
+
custom_translation_statuses: z.boolean(),
|
|
25
|
+
custom_translation_statuses_allow_multiple: z.boolean(),
|
|
26
|
+
segmentation: z.boolean(),
|
|
27
|
+
contributor_preview_download_enabled: z.boolean(),
|
|
28
|
+
});
|
|
29
|
+
export const PROJECT_QA_ISSUES_SCHEMA = z.object({
|
|
30
|
+
not_reviewed: z.number(),
|
|
31
|
+
unverified: z.number(),
|
|
32
|
+
spelling_grammar: z.number(),
|
|
33
|
+
inconsistent_placeholders: z.number(),
|
|
34
|
+
inconsistent_html: z.number(),
|
|
35
|
+
different_number_of_urls: z.number(),
|
|
36
|
+
different_urls: z.number(),
|
|
37
|
+
leading_whitespace: z.number(),
|
|
38
|
+
trailing_whitespace: z.number(),
|
|
39
|
+
different_number_of_email_address: z.number(),
|
|
40
|
+
different_email_address: z.number(),
|
|
41
|
+
different_brackets: z.number(),
|
|
42
|
+
different_numbers: z.number(),
|
|
43
|
+
double_space: z.number(),
|
|
44
|
+
special_placeholder: z.number(),
|
|
45
|
+
unbalanced_brackets: z.number(),
|
|
46
|
+
});
|
|
47
|
+
export const PROJECT_STATISTICS_SCHEMA = z.object({
|
|
48
|
+
progress_total: z.number(),
|
|
49
|
+
keys_total: z.number(),
|
|
50
|
+
team: z.number(),
|
|
51
|
+
base_words: z.number(),
|
|
52
|
+
qa_issues_total: z.number(),
|
|
53
|
+
qa_issues: PROJECT_QA_ISSUES_SCHEMA,
|
|
54
|
+
languages: z.array(LANGUAGE_STATISTICS_SCHEMA),
|
|
55
|
+
});
|
|
56
|
+
/**
|
|
57
|
+
* API_ Prefix was added to avoid clash with other PermissionSchema defined in permission/api.ts
|
|
58
|
+
* This is a workaround to release the code and unblock the task and should be revisited
|
|
59
|
+
*/
|
|
60
|
+
export const API_PROJECT_SCHEMA = z.object({
|
|
61
|
+
project_id: PROJECT_ID_SCHEMA,
|
|
62
|
+
uuid: z.guid(),
|
|
63
|
+
project_type: PROJECT_TYPE_SCHEMA,
|
|
64
|
+
name: z.string(),
|
|
65
|
+
description: z.string(),
|
|
66
|
+
created_at: z.string(),
|
|
67
|
+
created_at_timestamp: z.number(),
|
|
68
|
+
created_by: z.number(),
|
|
69
|
+
created_by_email: z.string(),
|
|
70
|
+
team_id: z.number(),
|
|
71
|
+
team_uuid: z.guid(),
|
|
72
|
+
base_language_id: z.number(),
|
|
73
|
+
base_language_iso: z.string(),
|
|
74
|
+
base_project_language_id: z.number(),
|
|
75
|
+
base_project_language_uuid: z.guid(),
|
|
76
|
+
settings: PROJECT_SETTINGS_SCHEMA.optional(),
|
|
77
|
+
statistics: PROJECT_STATISTICS_SCHEMA.optional(),
|
|
78
|
+
});
|
|
79
|
+
export const CREATE_PROJECT_REQUEST_BODY_SCHEMA = z.object({
|
|
80
|
+
name: z.string(),
|
|
81
|
+
team_id: z.string(),
|
|
82
|
+
base_lang_iso: z.string(),
|
|
83
|
+
languages: z.array(LANGUAGE_ISO_SCHEMA),
|
|
84
|
+
project_type: PROJECT_TYPE_SCHEMA,
|
|
85
|
+
is_segmentation_enabled: z.boolean(),
|
|
86
|
+
});
|
|
87
|
+
const NUMBER_BOOLEAN_SCHEMA = z.union([z.literal(0), z.literal(1)]);
|
|
88
|
+
export const LIST_PROJECTS_REQUEST_QUERY_SCHEMA = z.object({
|
|
89
|
+
filter_type: PROJECT_TYPE_SCHEMA.optional(),
|
|
90
|
+
filter_team_id: z.number().optional(),
|
|
91
|
+
filter_names: z.string().optional(),
|
|
92
|
+
include_statistics: NUMBER_BOOLEAN_SCHEMA.optional(),
|
|
93
|
+
include_settings: NUMBER_BOOLEAN_SCHEMA.optional(),
|
|
94
|
+
limit: z.number().optional(),
|
|
95
|
+
page: z.number().optional(),
|
|
96
|
+
});
|
|
97
|
+
export const LIST_PROJECTS_SUCCESS_RESPONSE_BODY = z.object({
|
|
98
|
+
projects: z.array(API_PROJECT_SCHEMA),
|
|
99
|
+
});
|
|
100
|
+
export const PROJECT_ID_PATH_PARAM_SCHEMA = z.object({ projectId: PROJECT_ID_OR_UUID_SCHEMA });
|
|
101
|
+
export const UPDATE_PROJECT_REQUEST_BODY_SCHEMA = z.object({
|
|
102
|
+
name: z.string().min(1),
|
|
103
|
+
description: z.string().optional(),
|
|
104
|
+
});
|
|
105
|
+
const PROJECT_PERMISSION_DETAILS_META_SCHEMA = z.object({
|
|
106
|
+
id: PERMISSION_ID_SCHEMA,
|
|
107
|
+
scope: API_PERMISSION_SCOPE_SCHEMA,
|
|
108
|
+
title: z.string(),
|
|
109
|
+
group: z.string(),
|
|
110
|
+
description: z.string().nullable(),
|
|
111
|
+
dependentPermissions: z.array(PERMISSION_ID_SCHEMA).optional(),
|
|
112
|
+
doesSetAllReadOnlyLanguages: z.boolean(),
|
|
113
|
+
newPermission: z.boolean().optional(),
|
|
114
|
+
isHidden: z.boolean().optional(),
|
|
115
|
+
availability: AVAILABILITY_SCHEMA.optional(),
|
|
116
|
+
});
|
|
117
|
+
const PROJECT_PERMISSION_TEMPLATE_DETAILS_META_SCHEMA = z.object({
|
|
118
|
+
id: z.number(),
|
|
119
|
+
role: z.string(),
|
|
120
|
+
permissions: z.array(PERMISSION_ID_SCHEMA),
|
|
121
|
+
description: z.string().nullable(),
|
|
122
|
+
tag: z.string().nullable(),
|
|
123
|
+
tagColor: z.string().nullable(),
|
|
124
|
+
tagInfo: z.string().nullable(),
|
|
125
|
+
isForMarketingProjects: z.boolean(),
|
|
126
|
+
doesEnableAllReadOnlyLanguages: z.boolean(),
|
|
127
|
+
availability: AVAILABILITY_SCHEMA.optional(),
|
|
128
|
+
});
|
|
129
|
+
export const GET_PROJECT_PERMISSION_META_RESPONSE_BODY_SCHEMA = z.object({
|
|
130
|
+
project_id: PROJECT_ID_SCHEMA,
|
|
131
|
+
project_uuid: z.guid(),
|
|
132
|
+
permissions: z.array(PROJECT_PERMISSION_DETAILS_META_SCHEMA),
|
|
133
|
+
roles: z.array(PROJECT_PERMISSION_TEMPLATE_DETAILS_META_SCHEMA),
|
|
134
|
+
});
|
|
135
|
+
export const DELETE_PROJECT_RESPONSE_SCHEMA = z.object({
|
|
136
|
+
project_id: PROJECT_ID_SCHEMA,
|
|
137
|
+
project_deleted: z.boolean(),
|
|
138
|
+
});
|
|
139
|
+
//# sourceMappingURL=projectTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projectTypes.js","sourceRoot":"","sources":["../../src/types/projectTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,8BAA8B,CAAA;AAC9E,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC1B,OAAO,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAA;AACpF,OAAO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;CAChE,CAAC,CAAA;AAMF,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACrD,UAAU,EAAE,iBAAiB;IAC7B,eAAe,EAAE,CAAC,CAAC,OAAO,EAAE;CAC7B,CAAC,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
export declare const TEAM_ROLES: readonly ["owner", "admin", "biller", "member"];
|
|
3
|
+
export declare const TEAM_ROLE_SCHEMA: z.ZodEnum<{
|
|
4
|
+
owner: "owner";
|
|
5
|
+
admin: "admin";
|
|
6
|
+
biller: "biller";
|
|
7
|
+
member: "member";
|
|
8
|
+
}>;
|
|
9
|
+
export type TeamRole = z.infer<typeof TEAM_ROLE_SCHEMA>;
|
|
10
|
+
//# sourceMappingURL=teamRoleTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"teamRoleTypes.d.ts","sourceRoot":"","sources":["../../src/types/teamRoleTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B,eAAO,MAAM,UAAU,iDAAkD,CAAA;AAEzE,eAAO,MAAM,gBAAgB;;;;;EAAqB,CAAA;AAElD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA"}
|